Refresh the Access Token
The access token expires in one hour. To generate a new access token, make the below POST request.
Check the URL you use to access Bookings to know which data center (DC) you are. You must use one of the following domain-specific Zoho accounts URLs.
For US: https://accounts.zoho.com
For AU: https://accounts.zoho.com.au
For EU: https://accounts.zoho.eu
For IN: https://accounts.zoho.in
For CN: https://accounts.zoho.com.cn
Request URL
<AccountsURL>/oauth/v2/token?refresh_token=<refresh_token>&client_id=<client_id>&client_secret=<client_secret>&grant_type=refresh_token
Request Method
POST
where:
Accounts_url* | Differs depending on your DC (refer to the above Account URL section to see which one to use)
|
refresh_token* | Received while generating access token |
client_id* and client_secret* | Generated upon registering the client application |
Note: Fields marked * are mandatory.
Response Type
JSON
More about the tokens
A maximum of 10 access tokens can be generated in a span of 10 minutes from a single refresh token.
Possible errors
invalid client
Verify you have used the correct client ID and secret.
Ensure that you are using the right domain in the URL. Refer to the Accounts URL section above.
invalid code
The refresh code might have expired or been revoked.
access denied
- If the request was working fine before and you are getting this error message now, then you have reached the new token generation limit. Try after a few minutes.
Sample Request
Copiedhttps://accounts.zoho.com/oauth/v2/token?refresh_token=1000.da337b8de64edd8a06c6d4772fa78212.9fa904b4032ef3bf9f4fcdf215ed345b&client_id=1000.M678X6QVMUZ1M7U0V41U5BJAIHS4FX&client_secret=eed703092429cb9a1994c286df2c034edb8a708b1b&grant_type=refresh_token
Sample Response
Copied{
"access_token": "1000.d2dddf7602e8e90b8e7252c07449da55.e794f7281ba755afaa803aefd19cb8ce",
"api_domain": "https://www.zohoapis.com",
"token_type": "Bearer",
"expires_in": 3600
}