Refresh Access Token

POST https://accounts.zoho.com/oauth/v2/token?refresh_token={{refresh_token}}&client_id={{client_id}}&client_secret={{client_secret}}&scope={{scope}}&redirect_uri={{redirect_uri}}&grant_type=refresh_token

Step 4: Refresh Access Tokens

Access tokens generally expire in one hour, which means a new access token has to be generated to keep the process going. You can eliminate the need to perform the entire procedure to generate access tokens, by using refresh tokens. Once the access token expires, the refresh token can be used to generate a new access token.

Refresh token can be obtained only when access_type is set to offline while creating the access token.

Refer to the example to understand how an access token can be obtained using the refresh token.

Note:

  • A User in an organization can have a maximum of 20 refresh tokens. And each refresh token can have a maximum of 30 active access tokens (non expired).
  • When a user creates a 31st access token, the system deletes the first created access token. Similarly, when the user creates the 21st refresh token, the system deletes the first created refresh token.
  • You can only generate a maximum of five refresh tokens in a minute.
  • We have provided with a sample test OAuth in all the examples, so that you can test any example on your own. You can replace the sample OAuth Token with your actual token to test requests from your Desk account.

Request Params

KeyDatatypeRequiredDescription
refresh_tokenstringRefresh token obtained while generating Access Token
client_idstringClient ID obtained after registering the client.
client_secretstringClient secret obtained after registering the client.
scopestringThe various scopes associated with Zoho Desk.You can use the list of scopes as per your requirement
redirect_uristringRedirect URI mentioned while registering the client.
grant_typestring

RESPONSES

status: OK

{"access_token":"1000.2d4437b4f862641d76dedac5f95a3f8a.fac6eb7129da540de1d53b06562e744d","token_type":"Bearer","expires_in":3600}