Migration for Self-Client Applications
Purpose
To generate access and refresh tokens from the existing auth token.
Use this option when your application is a standalone server-side application performing a back-end job, and you do not have a domain and a redirect URL.
How it Works?
The external application accesses the "Migration for Self-Client Applications" API with client ID, client secret, auth token, and the required oauth scopes.
Zoho Accounts checks whether the service names of the auth token and oauth scopes match.
After scope validation, Accounts checks whether the application owner is the same as the Auth token owner.
If the validation is successful, Accounts generates an OAuth token for the external application.
Otherwise, the system throws the error "access_denied".Accounts sends an email to the user about client upgrade.
Request URL
https://accounts.zoho.com/oauth/v2/token/self/authtooauth
Request Method
POST
Parameters
Parameter Name | Data Type | Description |
---|---|---|
client_id | String | Specify the client ID you obtained while registering your application |
client_secret | String | Specify the client secret generated from the connected application |
grant_type | String | The grant type must be authtooauth |
authtoken | String | Specify your auth token |
scope | String | Specify the OAuth scopes to access data from Zoho Recruit. For more details about Zoho Recruit scopes, refer What's New section of the Zoho Recruit REST API Documentation. |
Possible Errors
Error Message | Reason |
---|---|
invalid_grant | The grant_type is not specified as authtooauth |
access_denied | The authtoken you specified is already used to generate an OAuth token |
invalid_client | The client ID you specified is wrong |
invalid_authtoken | The auth token you specified is wrong |
invalid_scope | The OAuth scope you specified is invalid |
The maximum number of migration requests you can make per minute is 25 and per hour is 60.
After the generation of an OAuthtoken, the system deletes the old auth token after 1 day.
Sample Response
Copied{
"access_token": "1000.03xxxxxxxxxxxxxxxxxa5317.dxxxxxxxxxxxxxxxxxfa",
"refresh_token": "1000.95xxxxxxxxxxxxxxxb0de.10bxxxxxxxxxxxxxxxxxx31b",
"expires_in": 3600,
"token_type": "Bearer"
}