News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
OAuth authentication API
Tags: log in, developer sandbox
Jul 16, 2015 at 6:02am   •   10 replies  •  0 likes
sumit-agarwal

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!!!

10 Answers
answered on Jul 16, 2015 at 12:55pm  

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:

  1. Login to https://developer.ringcentral.com/ using your Developer Platform credentials (RC account credentials)
  2. 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).  
  3. The password is the password you received via email when you created the sandbox account, unless you have changed the password.
The above credentials can also be used for logging into, and reset at, the Online Account Portal for Sandbox Environment at: https://service.devtest.ringcentral.com/

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:
  1. For sandbox environment, the API sever end endpoint URI is  https://platform.devtest.ringcentral.com 
  2. 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:

  1. 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.
In addition to your user credentials, you need to ensure you are connecting to the correct Production API end point and using the correct application credentials described below:
  1. For production environment, the sever end endpoint uri is  https://platform.ringcentral.com 
  2. 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


 1
answered on Aug 30, 2017 at 10:51pm  
Hi Sushil,

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

 0
answered on Aug 30, 2017 at 9:19pm  
Hello,

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




 0
answered on Feb 21, 2017 at 3:31pm  

Can you send us an email or open a support ticket?


 0
answered on Feb 16, 2017 at 11:21am  
It stops working the moment i switch the app type to 'server only'

 0
answered on Feb 16, 2017 at 10:27am  
On top of that, i am unable to login with my 'main' account number auto-generated when i opened up a sandbox account.

https://service.devtest.ringcentral.com/#/number

but it works with the email option

 0
answered on Feb 16, 2017 at 10:24am  
Hi - i do provide all the correct information, but still get this error. what could i possibly be doing wrong? this is a sandbox account


 0
answered on Aug 4, 2015 at 9:18am  
International calling is not supported in the Sandbox. Please use US local numbers or numbers on your test account to place calls to verify your code. This will work as expected in Production provided the accounts you use there have the right privileges and credits to make international calls.

 0
answered on Aug 2, 2015 at 5:08am  
Hey VB,

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. 

 0
answered on Jul 16, 2015 at 8:13am  
"invalid_grant
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...

 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

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us