unable to get token and api
Tags: rest api
Aug 29, 2016 at 3:24pm • 2 replies • 0 likes
kraig-qin
just fill out my username, password, app key, app secret, then try it out, there is still not working. Also what is grant-type? i am not sure what should i do.
here is show me information:
Curl
curl -X POST --header "Content-Type: application/x-www-form-urlencoded" --header "Accept: application/json" --header "Authorization: Basic M3B5UWNrNjFSNFdnb000WkNKd3J2QToxMWNOak0yYVNRcWdxdXh1dFdMd25RdkxXWWl4RHZUY0szeEl5U25vMFJNZw==" -d "username=8575984477&password=8575984477D&extension=101&grant_type=password" "https://platform.devtest.ringcentral.com/restapi/oauth/token"
Request URL
https://platform.devtest.ringcentral.com/restapi/oauth/token
Response Body
{ "error": "invalid_grant", "error_description": "Invalid resource owner credentials." }
Response Code
400
Response Headers
{ "date": "Mon, 29 Aug 2016 22:10:07 GMT", "routingkey": "SJC11P01PAS02", "content-length": "94", "content-language": "en", "content-type": "application/json;charset=UTF-8" }
Curl
curl -X POST --header "Content-Type: application/x-www-form-urlencoded" --header "Accept: application/json" --header "Authorization: Basic dGYxM0wydlBSVGE0WUFOWEo4U1RoUTpNZjNYWEtoTFNSZVM0NGw1cVcxYUNBS3I3NUxNaWxSLVd1cS1FNTBadkdTUQ==" -d "username=8575984477&password=8575984477D&grant_type=password" "https://platform.devtest.ringcentral.com/restapi/oauth/token"
Request URL
https://platform.devtest.ringcentral.com/restapi/oauth/token
Response Body
{ "error": "unauthorized_client", "error_description": "Unauthorized for this grant type" }
Response Code
400
Response Headers
{ "date": "Mon, 29 Aug 2016 22:18:14 GMT", "routingkey": "SJC11P01PAS02", "content-language": "en", "content-type": "application/json;charset=UTF-8", "content-length": "97" }
2 Answers
I'm making this a private conversation since you've included your username and password in the posts.
A phone call should not be necessary since we have ample documentation about getting started available online.
The Authorization Types available for your application are determined by the Platform Type (which is immutable once set).
If you need to use the Resource Owner Credentials Password Flow, you will need to create an application with the Platform Type set to "Server Only, No UI". Since that is the only option for this type of auth.
Make sure to use the appropriate user credentials (from within your sandbox account).
We understand your emphasis for getting this into production quickly, but you need to read the documentation (or provide access to your developer and give them the time needed to understand how to work with our platform and to properly follow our documented best practices).
Sincerely,
Benjamin Dean
Developer Relations Manager
RingCentral Platform
A phone call should not be necessary since we have ample documentation about getting started available online.
The Authorization Types available for your application are determined by the Platform Type (which is immutable once set).
If you need to use the Resource Owner Credentials Password Flow, you will need to create an application with the Platform Type set to "Server Only, No UI". Since that is the only option for this type of auth.
Make sure to use the appropriate user credentials (from within your sandbox account).
We understand your emphasis for getting this into production quickly, but you need to read the documentation (or provide access to your developer and give them the time needed to understand how to work with our platform and to properly follow our documented best practices).
Sincerely,
Benjamin Dean
Developer Relations Manager
RingCentral Platform
0
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