Migration for Redirection-based Applications
Purpose
To generate access and refresh tokens from the existing auth token.
Use this API when your application has multiple users and it obtains their username and password to generate an auth token, or if the users input their auth tokens.
The application owner must share the client ID, auth token, auth token scopes, and the required OAuth scopes over an email to support@zohorecruit.com.
Zoho Recruit validates the auth token and the associated scope, and configures them in Zoho Accounts. After successful validation, Zoho Recruit informs the application owner about the client upgrade over an email.
How it Works?
After successful validation from the service team, the external application accesses the "Migration for Redirection-based Applications" API with client ID, client secret, and auth token.
Zoho Accounts checks whether the parameters passed in the request are already verified.
After successful validation, Accounts provides OAuth access and refresh tokens to the application.
Request URL
https://accounts.zoho.com/oauth/v2/token/external/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 |
Possible Errors
Error Message | Reason |
---|---|
invalid_grant | The grant_type is not specified as authtooauth |
access_denied | The auth token you specified is already used to generate an OAuth token or You call the migration API after the allowed time of migration(expired) or the system has blocked the client |
invalid_client | The client ID you specified is wrong or the auth to oauth mapping entry for the valid client is not made in accounts |
invalid_authtoken | The auth token you specified is wrong or the auth token scope mismatches with the pre-shared auth scopes |
invalid_scope | The OAuth scope you specified is invalid |
The maximum number of migration requests you can make per minute is 60 and per hour is 100.
After the generation of an OAuthtoken, the system deletes the old auth token after 1 day.
The maximum number of times a client can pass an invalid auth token is 20. If you exceed this limit, the system blocks the client and throws the error message "access_denied".
Sample Response
Copied{
"access_token": "1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf",
"refresh_token": "1000.b8xxxxxxxxxxxxxxxx58f.538b3xxxxxxxxxxxxxxxxx114",
"expires_in": 3600,
"token_type": "Bearer"
}