Skip to main content

hi I am new to RingCentral but I have some programming experience. I have an auto repair shop and I just got RingCentral account with two VoIP numbers. I’m trying to open up customer information form when call comes in. I have a small listener python program running on my machine with ngrok set up I’m having trouble connecting or setting up the web event onto central side I would appreciate if somebody would guide me through thank you so much

Check this dev guide getting started article. Copy the sample code and follow the instructions to setup your Python webhook.


Thanks for your advice. I have tried that and server part works fine. When I try to. Execute the. Webhub's part of the. Application. I get the following errors and. Check my user ID secrets and. JWT. I think I'm very close. To be done. If I can get this authentication part. Text. Please see the following errors

Exception has occurred: SystemExit

  •  

Unable to authenticate to platform. Check credentials.HTTP 400 { "error" : "unauthorized_client", "error_description" : "Unauthorized for this grant type", "errors" : [ { "errorCode" : "OAU-251", "message" : "Unauthorized for this grant type" } ] } (request details: Method: POST URL: https://platform.ringcentral.com/restapi/oauth/token Headers: {'Authorization': 'Basic WTRoQzZJUEZrcT...', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Unnamed/0.0.0 win32/VERSION PYTHON/VERSION RCPYTHONSDK/VERSION', 'X-User-Agent': 'Unnamed/0.0.0 win32/VERSION PYTHON/VERSION RCPYTHONSDK/VERSION', 'Content-Length': '760'})

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://platform.ringcentral.com/restapi/oauth/token During handling of the above exception, another exception occurred: File "C:\Peak\webhook.py", line 72, in login platform.login( jwt=os.environ.get('RC_USER_JWT') ) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ringcentral.http.api_exception.ApiException: HTTP 400 { "error" : "unauthorized_client", "error_description" : "Unauthorized for this grant type", "errors" : [ { "errorCode" : "OAU-251", "message" : "Unauthorized for this grant type" } ] } (request details: Method: POST URL: https://platform.ringcentral.com/restapi/oauth/token Headers: {'Authorization': 'Basic WTRoQzZJUEZrcT...', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Unnamed/0.0.0 win32/VERSION PYTHON/VERSION RCPYTHONSDK/VERSION', 'X-User-Agent': 'Unnamed/0.0.0 win32/VERSION PYTHON/VERSION RCPYTHONSDK/VERSION', 'Content-Length': '760'}) During handling of the above exception, another exception occurred: File "C:\Peak\webhook.py", line 76, in login sys.exit("Unable to authenticate to platform. Check credentials." + str(e)) ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Peak\webhook.py", line 78, in <module> login() ~~~~~^^ SystemExit: Unable to authenticate to platform. Check credentials.HTTP 400 { "error" : "unauthorized_client", "error_description" : "Unauthorized for this grant type", "errors" : [ { "errorCode" : "OAU-251", "message" : "Unauthorized for this grant type" } ] } (request details: Method: POST URL: https://platform.ringcentral.com/restapi/oauth/token Headers: {'Authorization': 'Basic WTRoQzZJUEZrcT...', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Unnamed/0.0.0 win32/VERSION PYTHON/VERSION RCPYTHONSDK/VERSION', 'X-User-Agent': 'Unnamed/0.0.0 win32/VERSION PYTHON/VERSION RCPYTHONSDK/VERSION', 'Content-Length': '760'})

  •  
  •  
  •  
  •  
  •  

Do you use the RingCentral Python SDK? If you implement your own code to authenticate a user using the JWT, check this dev guide and set the request body accordingly.