unable to get access token
Hello,
Do not know why the api procedure is really hard for the developers
Pretty simple method and defined pretty much puzzled way. I followed your steps I understood first you will have to get self client a grantToken ok understood did the same and also followed example code
$oAuthClient = ZohoOAuth::getClientInstance();
$grantToken = 'xxxx';
$oAuthTokens = $oAuthClient->generateAccessToken($grantToken);
var_dump($oAuthTokens);
now suddenly on next step you are saying to be a refresh token now where do we find that i don't know but when I try to run above code here is what I am getting
ZohoOAuthException Caused by:'ZohoOAuthException Caused by:'Exception while fetching access token from grant token - HTTP/1.1 200 Server: ZGS Date: Sat, 18 May 2019 12:00:17 GMT Content-Type: application/json;charset=UTF-8 Content-Length: 26 Connection: keep-alive Set-Cookie: a6c51d9354=a711b6da0e6cbadb5e254290f114a026; Path=/ X-Content-Type-Options: nosniff X-XSS-Protection: 1 Set-Cookie: iamcsr=99cc87ef-be39-40b0-96ed-fb776a2565d8;path=/;Secure;priority=high X-Frame-Options: SAMEORIGIN Strict-Transport-Security: max-age=15768000 {"error":"invalid_client"}' in E:\xampp\htdocs\ecwid\zohoCrm\vendor\zohocrm\php-sdk\src\com\zoho\oauth\client\ZohoOAuthClient.php(84) #0 E:\xampp\htdocs\ecwid\zohoCrm\vendor\test.php(9): ZohoOAuthClient->generateAccessToken('1000.51e816497c...') #1 {main}' in E:\xampp\htdocs\ecwid\zohoCrm\vendor\zohocrm\php-sdk\src\com\zoho\oauth\client\ZohoOAuthClient.php(89) #0 E:\xampp\htdocs\ecwid\zohoCrm\vendor\test.php(9): ZohoOAuthClient->generateAccessToken('1000.51e816497c...') #1 {main}
Now I am suprised everything if it's done according to by follwing your steps except you haven't told that where to get the scopes seriously ? Now please tell me what I am doing wrong