i recently started experimenting in the RingCentral sandbox environment and facing issues with this part of the code
rcsdk = SDK(CLIENTID,CLIENTSECRET,SERVERURL) platform = rcsdk.platform() try: platform.login(USERNAME,EXTENSION,PASSWORD,JWT) except Exception as e: sys.exit("Unable to authenticate to platform. Check credentials." + str(e))
I went to know if there is an alternative to code
Advertisement
Answer
Looking at your code snippet, I can see that the platform.login() function signature is incorrect as you are passing extra argument.
Correct function signatures in Python are:
Logging with username, password flow:
platform.login(USERNAME, EXTENSION, PASSWORD)
Logging with JWT :
platform.login( jwt=JWT_TOKEN )
Make sure to replace the UPPERCASE String with the actual credential found in RingCentral Developer Portal for your app’s sandbox environment and it should work.
Reference: