January Tidbits

SMS Questions Answered

You've got SMS questions; We've got Answers!

question

bill259 avatar image
bill259 asked Anirban Sen Chowdhary edited

Can anyone send the example of "restapi/oauth/token" api with dummy values?

Can anyone send the example of "restapi/oauth/token" api with dummy values?
topic-default
1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

John Wang avatar image
John Wang answered
Here is an example using curl and OAuth 2.0 password grant from our FAQ:

https://github.com/ringcentral/ringcentral-faq/blob/master/docs/fax.md

curl -u '{clientId}:{clientSecret}' -d 'grant_type=password&username={username}&extension={extension}&password={password}' -X POST https://platform.devtest.ringcentral.com/restapi/oauth/token

Does this help?

1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Anirban Sen Chowdhary avatar image
Anirban Sen Chowdhary answered Anirban Sen Chowdhary edited

Your url: https://platform.devtest.ringcentral.com/restapi/oauth/token

Headers:

"Accept":"application/json“
"Content-Type":"application/x-www-form-urlencoded“
"Authorization",:"Basic <ClientID:ClientSecret in base 64> 

Here you can get the clientID and clientSecret from your developer account portal under dashboard tab which needs to be converted into base 64 format.

In body, we need to pass the parameters in following way :


username=<account phone number>&password=<account password>&extension=<your extension>&grant_type=password

username will be the phone number associated with the account. Again, you will get that from dashboard.

1 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.