I've tried multiple credential combinations. I've recreated multiple sandbox apps just to make sure I was setting them up correctly.
The only thing I think may be conflicting is the Company Main Number in my develoepr account is different than the phone number (username) that has been assigned to my apps.
Environment: sandbox
Main Company Number: +1629235xxxx
Apps Phone number (username): +1267299xxxx
When I use the +1267299xxxx number in the API Reference docs 'Try it out'. I get the json response just fine. When I try to make the request using python SDK it give the following.
Traceback (most recent call last):
File "/home/user/repos/flask-api/fapi/lib/python3.10/site-packages/ringcentral/http/client.py", line 28, in send
response.response().raise_for_status()
File "/home/user/repos/flask-api/fapi/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://platform.devtest.ringcentral.com/restapi/oauth/token
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/repos/flask-api/PassFlowringcentral-CallLogPull.py", line 15, in <module>
requests.login(env.get('USERNAME'), env.get('EXTENSION'), env.get('PASSWORD'))
File "/home/user/repos/flask-api/fapi/lib/python3.10/site-packages/ringcentral/platform/platform.py", line 127, in login
raise e
File "/home/user/repos/flask-api/fapi/lib/python3.10/site-packages/ringcentral/platform/platform.py", line 121, in login
response = self._request_token(TOKEN_ENDPOINT, body=body)
File "/home/user/repos/flask-api/fapi/lib/python3.10/site-packages/ringcentral/platform/platform.py", line 194, in _request_token
return self.send_request(request, skip_auth_check=True)
File "/home/user/repos/flask-api/fapi/lib/python3.10/site-packages/ringcentral/platform/platform.py", line 170, in send_request
return self._client.send(self.inflate_request(request, skip_auth_check=skip_auth_check))
File "/home/user/repos/flask-api/fapi/lib/python3.10/site-packages/ringcentral/http/client.py", line 34, in send
raise ApiException(response, e)
ringcentral.http.api_exception.ApiException: Invalid resource owner credentials
I am not sure what to do next as the credentials I know are correct. Maybe the URL?