To generate, first we need to make register the client and obtain client Id and client secret.
Once it generated, we need to make an authorization request of the form.
“https://accounts.zoho.in/oauth/v2/auth?response_type=code&client_id=1000.YER1ZKFUZAJ9S53P8ZIZ09MSZMPFMG&scope=ZohoCRM.modules.ALL&redirect_uri=https://td2896732.app.netsuite.com/app/common/scripting/scriptrecord.nl?id=2358&access_type=offline”
type this in a web browser and zoho access page will open, accept this.
Then it will redirect to the implementation page of our script.From the URL of this we can get the value for Code.
“https://td2896732.app.netsuite.com/app/common/scripting/scriptrecord.nl?id=2358&code=1000.8471c7a1536f6a1b6d67063776373568.7f37f50d2f2abca59e265af6fe832bff&location=in&accounts-server=https%3A%2F%2Faccounts.zoho.in&”
We can use the value of this code to make access token request.
Generate an access token request with required parameter like this
“https://accounts.zoho.in/oauth/v2/token?client_id=1000.YER1ZKFUZAJ9S53P8ZIZ09MSZMPFMG&grant_type=authorization_code&client_secret=c9794dca4946f9bea82255b9f2b6018b7ecc81e1f2&redirect_uri=https://td2896732.app.netsuite.com/app/common/scripting/scriptrecord.nl?id=2358&code=1000.8471c7a1536f6a1b6d67063776373568.7f37f50d2f2abca59e265af6fe832bff&access_type=offline”
then copy this request to post man and click send, Zoho Accounts sends the access token and the optional refresh token.