When using the PHP SDK (using version 2 or 2.1), when we query the records (Contacts) using a scope
ZohoCRM.modules.ALL, we get an error saying
invalid oauth scope to access this URL. Digging a bit deeper in the code, I notice that the call to
https://www.zohoapis.com/crm/v2.1/Contacts was performed well but the issue was related to this particular call in the
RecordOperations.php class:
- Utility::getFields($moduleAPIName, $handlerInstance);
This function is used in a bunch of methods related to records and seem to throw that invalid scope error. Commenting this line out, I can get the result I expect. However, it's not a valid fix, I don't want to start hacking the SDK.
In the log, it says
INFO GET - URL = https://www.zohoapis.com/crm/v2.1/settings/fields?module=Contacts. So I supposed this Utility function needed an extra scope to be able to work. I've tried to add the
ZohoCRM.settings.ALL scope when I generate my token but without success.
Any idea of what should be done here ? Is this a matter of adding an extra scope (in that case, which one ?) or is this an issue related to the PHP SDK itself ?