I'm working through the Authorization Flow Quick Start App using Python Django. This required making a few changes to the Flask code provided, but most of the flow is working. The index page sends me to RingCentral login, which then sends me back to the test page as it should. But when I click on any of the three links on that page I get the same error:
AttributeError at /test/
'bytes' object has no attribute 'get'
Here's the slightly modified code that handles the test page:
platform = SyncConfig.rcsdk.platform()
if platform.logged_in() == False:
api = request.GET.get('api')
if api == "extension":
resp = platform.get("/restapi/v1.0/account/~/extension")
elif api == "extension-call-log":
resp = platform.get("/restapi/v1.0/account/~/extension/~/call-log")
elif api == "account-call-log":
resp = platform.get("/restapi/v1.0/account/~/call-log")
return render(request, 'sync/test.html')
Has anyone setup a Django authorization flow and can show me where this is breaking?