question

Rick Smith avatar image
Rick Smith asked Phong Vu commented

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




sending smspython
2 comments
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

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

0 Likes 0 ·
Rick Smith avatar image Rick Smith Phong Vu ♦♦ ·

Hello,


Thanks for the response, This is what I am getting now, it seems to object to the client id but it does not say why , I have copied this ID directly from the account page...waht am I doing wrong?

Thanks

Message='1MQ8Fg52RwOZCcJWrA4-kA'
Source=C:\Users\Rick\source\repos\RCMaintNotify\RCMaintNotify\RCMaintNotify.py
StackTrace:
File "C:\Users\Rick\source\repos\RCMaintNotify\RCMaintNotify\RCMaintNotify.py", line 41, in <module>
rcsdk = SDK(os.environ[RINGCENTRAL_CLIENTID], os.environ[RINGCENTRAL_CLIENTSECRET], os.environ[RINGCENTRAL_SERVER])



0 Likes 0 ·
Phong Vu avatar image
Phong Vu answered

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.

1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Rick Smith avatar image
Rick Smith answered Phong Vu commented

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

7 comments
1 |1500 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

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.

0 Likes 0 ·
Rick Smith avatar image Rick Smith Phong Vu ♦♦ ·

Not sure why that was done, I am inheriting this...If you can help change it, I would appreciate it. Otherwise I will just create a new one.


Thanks|
Again

0 Likes 0 ·

It's now Private and Password Flow type. Try again

0 Likes 0 ·
Show more comments

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys