How does OAuth work as far as getting the token and refreshing of the token in my code?

  • 2
  • Question
  • Updated 7 months ago
  • Answered
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?
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb

Posted 2 years ago

  • 2
Photo of Benjamin Dean

Benjamin Dean, Alum

  • 8,642 Points 5k badge 2x thumb
Our API’s 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
Photo of sahiba singh

sahiba singh

  • 90 Points 75 badge 2x thumb
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.