Uncaught zcrmsdk\crm\exception\ZCRMException Caused by:'invalid oauth token'
Hello Zoho Team,
I am facing this issue again and again when I try to access the Leads module.
I generated the grant token with this scope "ZohoCRM.modules.ALL".
This is my configuration
$configuration=array(
"client_id"=>$client_id,
"client_secret"=>$client_secret,
"redirect_uri"=>$redirect_url,
"currentUserEmail"=>$user_email_id,
"access_type"=>$access_type,
);
$rest=ZCRMRestClient::getInstance();
$rest->initialize($configuration);
$oAuthClient = ZohoOAuth::getClientInstance();
$grantToken = '1000.30989f8fe48c884a6f046c6aa04fcbc5.a4f63a6d8df5228fd8330dd96ab647f1'; //hard coded
$oAuthTokens = $oAuthClient->generateAccessToken($grantToken);
everything goes well till here
$module=$rest->getModule("Leads")->getData(); // this line give me the error;
I am new to zoho and really need your help. Please reply asap.