Question

String is not JSON formatted

  • 3 June 2021
  • 4 replies
  • 431 views

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





4 replies

Userlevel 1

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

Userlevel 1

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.

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

Userlevel 1

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.

Reply