V2 Oauth token generation issue

V2 Oauth token generation issue

Hi,

  I have been trying to generate access token for self client. I tried the http post method, and i get 'invalid_response_type'. I also tried the php sdk code:

ZCRMRestClient::initialize($config);
$oAuthClient = ZohoOAuth::getClientInstance();
$grantToken = '1000.7c56126f557b0f1cb69cfb4a7a95b3bb.d47522df0b9800b74331df6172259749';
$oAuthTokens = $oAuthClient->generateAccessToken($grantToken);

but in this case i keep getting 'invalid_client' in the reponse.

I have double checked and made sure the url in my code is accounts.zoho.eu which is correct.
client id and secret are correctly placed. Please help why this keeps failing either way. Also the second way is no where to be found in your documentation, I had to search everywhere to find this sample code, which should work the way i see it.

Please let me know how to complete the access token process in php, your documentation only mentiones bits and pieces and there is not a single full sample of accessing/inserting/updating records from start till the end.

Quick help will be appreciated.
{"error":"invalid_client"}' in /www/furl-v2/modules/api/vendor/zohocrm/php-sdk/src/com/zoho/oauth/client/ZohoOAuthClient.php(84)