ZohoOAuthException when trying to fetch access token with Java SDK
Hello,
I first tried the french documentation which was obsolete. I had to go to the english documentation to have up-to-date information. Or so I thought.
I had to modify the given code. Instead of
ZohoOAuthClient client = ZohoOAuthClient.getInstance();
client.generateAccessToken("generated_grant_token");I had to write :
ZohoOAuthParams zcrmAuth = new ZohoOAuthParams();
zcrmAuth.setClientId("(replacing for posting");
zcrmAuth.setClientSecret("(replacing for posting)");
zcrmAuth.setRedirectURL("https: //crm.zoho.eu");
zcrmAuth.setScopes("aaaserver.profile.READ"); //scope for testing access
ZohoOAuthClient client = ZohoOAuthClient.getInstance(zcrmAuth);
I have created my token from https://api-console.zoho.eu, so I wrote eu everywhere I needed (redirect_uri and domainSuffix). It was hard, but finally I got the reason why it won't work : Instead of json string, I receive a html error page when accessing https://accounts.zoho.eu/oauth/v2/token (tried to replace with com and also error...).
I really need to understand what is wrong. Did I forget something ? Has there been a recent update with the sdk and the documentation is not yet up to date ? Or is the documentation based on an updated SDK ? I am using :
<dependency>
<groupId>com.zoho.crm</groupId>
<artifactId>java-sdk</artifactId>
<version>2.1.2</version>
</dependency>