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
CURL command to get access token not working
Tags: error
Jun 1, 2017 at 11:08pm   •   4 replies  •  0 likes
pratap-s

Hi


I am trying to get my access token using curl command. I looked at Question "https://devcommunity.ringcentral.com/ringcentraldev/topics/curl-command-for-requesting-access-token" but it is not working for me.


I am always getting : { "error" : "invalid_grant",

"error_description" : "Invalid resource owner credentials."

}


My credential are correct and also I tried with secret/access key and enoced it to base64 as well but for both the cases its throwing me the same above error.


If my credential are invalid I should not be able to login to web dashboard itself. I am bit confused here and not sure where I am going/doing wrong.


Thanks,

Pratap

4 Answers
answered on Jul 6, 2019 at 12:23pm  

"Also I want to disable expires for access_token and refresh_token. How can we achieve this? "

In any OAuth system in the earth, there is no way to disable expires for access_token and refresh_token because that will be a security issue. You cannot use a permanent access_token and refresh_token as that contradict the idea of OAuth Security system.


 0
answered on Jun 2, 2017 at 8:06pm  
It's impossible to disable token expires. You can set them to the maximum expires_in value. As far as I can tell, access token expires in one hour. Refresh token lifetime is typically limited to one week

It is possible to use CURL to post messages to Glip group. Please have a try and create a new ticket if you have difficulties.

 0
answered on Jun 2, 2017 at 12:40am  
Thanks it turn out to be I was using production for devtest :( . Also I want to disable expires for access_token and refresh_token. How can we achieve this? Also I was looking for CURL API commands to post messages to Glip goup chat is that possible?

 0
answered on Jun 1, 2017 at 11:16pm  
curl -i -X POST "https://platform.devtest.ringcentral.com/restapi/oauth/token"; \
-H "Accept: application/json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-u "appKey:appSecret" \
-d "username=username&password=password&extension=&grant_type=password"


If it doesn't work. It's probably because your credential is wrong.

Please note that, you cannot use a sandbox credential for production or vice versa.

 1



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