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
How does OAuth work as far as getting the token and refreshing of the token in my code?
Tags: getting started
Apr 13, 2016 at 1:55pm   •   3 replies  •  0 likes
benjamin-dean

Saw this question being asked in an email thread and thought I would share it for anyone who may have the same question...


How does OAuth work as far as getting the token and refreshing of the token in my code?
Does my app need to request a new token after a period of time?

3 Answers
answered on Jun 18, 2019 at 1:17pm  

The parameter for refresh_token is almost same as grant_type password with minor change.

url will be same: 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> 

Body:

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

username=<account phone number>&password=<account password>&extension=<your extension>&grant_type=refresh_token&refresh_token=<the refresh token generated>

 0
answered on Feb 25, 2018 at 9:32am  
Thanks for share.This link may everyone know.It is better if you share the parameter,you passed in api to get the refresh token.


 0
answered on Apr 13, 2016 at 1:56pm  
Our APIs use Oauth 2.0 Protocol for authentication and authorization. Once the app is authenticated our servers return back the access token and refresh token which are valid for 1 hour and 1 week respectively. You are able to cache the tokens and use them to request new access/refresh tokens after they are expire. We provide different authorization flows for a client application :
  • Authorization Code Flow ( recommended for Client/Browser Applications )
  • Resource Owner Password Credentials Flow (ROPC)
  • Refresh Token Flow
More information on Authorization Flows could be found here : https://developer.ringcentral.com/api-docs/latest/index.html#!#AuthorizationFlows.html

 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