Skip to main content
The First Step
June 3, 2021
Question

String is not JSON formatted

getting exception string is not JSON formatted


This is throwing it, what should this be?

I have been using

RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com'

rcsdk = SDK(os.environ[RINGCENTRAL_CLIENTID], os.environ[RINGCENTRAL_CLIENTSECRET], os.environ[RINGCENTRAL_SERVER])

And it worked, has this changed?


I have also tried
RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com/restapi/oauth/token'


No difference


Using Python 3.7 64




5 replies

PhongVu
Community Manager
Community Manager
June 4, 2021

Please revise your question, I really don't know what worked and what did not work.

PhongVu
Community Manager
Community Manager
June 4, 2021

Why don't you try with the value first to see if all the parameters are correct

RINGCENTRAL_CLIENTID = '1MQ8Fg52RwOZCcJWrA4-kA'
RINGCENTRAL_CLIENTSECRET = 'abc...'
RINGCENTRAL_SERVER = 'https://platform.devtest.ringcentral.com'

rcsdk = SDK(RINGCENTRAL_CLIENTID,RINGCENTRAL_CLIENTSECRET,RINGCENTRAL_SERVER)

If that works, then the problem is in your environment. If that does not work, then those params could be incorrect, but let's see what you'll get first.

The First Step
June 4, 2021

No change it is still objecting to: '1MQ8Fg52RwOZCcJWrA4-kA'

PhongVu
Community Manager
Community Manager
June 4, 2021

Looking at your app settings, it is a "Public" app with "Desktop/Windows" platform type. This type of app does not support password flow authentication. Is there a reason you choose those settings for your app? To use password flow, you must choose the app platform type as "Server only- No UI" and it must be a "Private" app.

You cannot modify this app anymore. Either you create a new app properly or let me know if you want to change this app. I can help to change those settings.

The First Step
June 5, 2021

So tried changing the password?? No go!, It just does not work, I need to think some about going forward with this...I am still not sure what the exception is? Other than it still objects to the client ID...