Get Refresh Token

Open URL

Open this URL and you should see the following screen:

2906

Click Accept.

Copy the Code

After you click Accept you will see the following screen. Don't worry about the error message, this is expected. Copy the URL from the browser.

3224

The URL you copied should have the following format:

http://localhost/redirect?code=1000.875abcdf&location=us&accounts-server=https%3A%2F%2Faccounts.zoho.com&

Now we need to extract the value of the code so that would be the part between code= and &location. So in this example http://localhost/redirect?code=1000.875abcdf&location=us&accounts-server=https%3A%2F%2Faccounts.zoho.com& the code would be 1000.875abcdf

Save that value of the code.

Get Refresh Token

To get a refresh token we need to make a POST API call in the following format but replace with your code, client ID and secret:

curl --location --request POST 'https://accounts.zoho.com/oauth/v2/token?code=1000.4ffc417ba47446b40ba02ff8f27fc1a0.cec83e8101586d6d4a9549a386d8fb0e&grant_type=authorization_code&client_id=1000.E5TG82CB2CWSLY7T5NE5KE9S6L2NWW&client_secret=1def7b046a2adfdda81cfdfaee84af337e7c7928a8&redirect_uri=http://localhost/redirect'

You should get the following response:

{
  "access_token":"1000.fc8ddc278a542ff3f6d7125d851290eb.99dc5f656abc5eb87a2384b52c07b28b",
  "refresh_token":"1000.12a598443549d4b1a66ffd4e8c916cff",
  "api_domain":"https://www.zohoapis.com",
  "token_type":"Bearer",
  "expires_in":3600
}

Save the refresh token in a Flow Configuration and you can now use that token as input into the Zoho Login Action.