Hey, I am trying to get the access token and refresh token. I am sending the request using curl. I have followed all the steps written in API docs. The response I am getting is
{
"error" : "invalid_grant",
"error_description" : "Invalid resource owner credentials."
}
Can u tell me what's wrong with that ????
Thank You!!!
This error indicates that the user credentials provided are improper, e.g. username, extension, and/or password.
Below is information on getting your proper credentials in the Sandbox Environment and Production Environment.
1) Sandbox Environment User Credentials
If you are on Sandbox Environment, follow the below steps to get your sandbox account credentials:
- Login to https://developer.ringcentral.com/ using your Developer Platform credentials (RC account credentials)
- Go to your Sandbox Account page: "My Account > Sandbox Account". Locate the "Main Company Number" which will be your username when formatted in E.164 format, (example: +12223334444).
- The password is the password you received via email when you created the sandbox account, unless you have changed the password.
In addition to your user credentials, you need to ensure you are connecting to the correct Sandbox API end point and using the correct application credentials described below:
- For sandbox environment, the API sever end endpoint URI is https://platform.devtest.ringcentral.com
- Find your application key and secret by clicking on My Account -> Applications -> Application Name. Use Sandbox Application key and secrets
The easiest way to start testing our APIs would be by using our API Explore here http://ringcentral.github.io/api-explorer/. You can start filling out your RC sandbox credentials and start going from there. We have self explanatory documentation in the link above.
2) Production Environment
If you are on Production Environment, follow the below steps to get your production account credentials:
- The user credentials for production are the same ones as for your RingCentral phone account that you use, e.g. to log into the Online Account Portal at https://service.ringcentral.com.
- For production environment, the sever end endpoint uri is https://platform.ringcentral.com
- Find your application key and secret by clicking on My Account -> Applications -> Application Name. Use Production Application key and secrets
For more information please visit this link: https://developer.ringcentral.com/library/tutorials/test-account.html
Before you login, could you please check if the Application type = Private and Platform Type = Server-only ( NO UI ).
As all other application types would need Authorization Code Flow or commonly known as OAuth2.0 as the authentication flow. However, if your application is of the above mentioned type then you can use the Password Flow as the authentication flow.
However, I would recommend you take a look at our dev community article below on how to login ( get tokens ) through cURL:
https://devcommunity.ringcentral.com/ringcentraldev/topics/curl-command-for-requesting-access-token
I want to use Ringcentral Ringout call in my app. I follow https://developer.ringcentral.com/api-explorer/latest/index.html#/RingOut
But, I am unable to login through CURL. Please assist how can I login through CURL
https://service.devtest.ringcentral.com/#/number
but it works with the email option
Thanks for the reply. I have got the acces token. Now, I am trying to make a ringout call using the ringcentral API. The request body I am passing is like this :
{ "to": {"phoneNumber": "91*******"},
"from": {"phoneNumber": "91*******"},
"callerId": {"phoneNumber": "91*******"},
"playPrompt": true
}
The response I am getting is :
{ "message": "Forbidden", "errorCode": "InternationalProhibited" }
The same call when I try to make with the ringcentral account is successful. Can u tell me what's wrong with that.
The provided authorization grant (e.g., authorization
code, resource owner credentials) or refresh token is
invalid, expired, revoked, does not match the redirection
URI used in the authorization request, or was issued to
another client.
" I found this document, hope it helps:
http://oauthlib.readthedocs.org/en/la...
A new Community is coming to RingCentral!
Posts are currently read-only as we transition into our new platform.We thank you for your patience
during this downtime.
Try Workflow Builder
Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!Try RingCentral Workflow Builder