Problem reading all responses from API - Unknown zcrmsdk\crm\exception\ZCRMException

Problem reading all responses from API - Unknown zcrmsdk\crm\exception\ZCRMException

Hi,

I'm upgrading a ZOHO PHP SDK client application from V1 to V2. In order to keep the V1 implementation running while i'm working om the new one, i've created a new client_id for the new implementation.

I've updated the zohocrm/php-sdk from 1.0.2 to 2.0.9 using composer.
Created the new client_id
Got a grant token with the following scopes: aaaserver.profile.READ,ZohoCRM.users.ALL,ZohoCRM.modules.ALL,ZohoCRM.settings.all
Got a refresh token and setup file persistence.
Authentication looks good. I get no auth errors when initializing the client and the persistence file is populated with serialized data.

The problem:
every call I make to the API results in an 'Unknown zcrmsdk\crm\exception\ZCRMException'.

Example:
<code>
        $configuration = [...];
        ZCRMRestClient::initialize($configuration);

        try{
            $user=ZCRMRestClient::getInstance()->getCurrentUser();
            var_dump($user);
            die();
        } catch (ZCRMException $e) {
            echo $e->getCode() . "<br>";
            echo $e->getMessage() . "<br>";
            echo $e->getExceptionCode() . "<br>";
        }

        die();

</code>

results in:

Notice: Undefined offset: 1 in .../vendor/zohocrm/php-sdk/src/crm/api/response/CommonAPIResponse.php on line 117
0
Unknown zcrmsdk\crm\exception\ZCRMException
Unknown


trace in ZCRMClientLibrary.log
time ERROR: zcrmsdk\crm\exception\ZCRMException Caused by:'Unknown zcrmsdk\crm\exception\ZCRMException' in .../zohocrm/php-sdk/src/crm/exception/ZCRMException.php(31)
Trace::#0 .../zohocrm/php-sdk/src/crm/api/response/BulkAPIResponse.php(72): zcrmsdk\crm\exception\ZCRMException->__construct(NULL, 302)
#1 .../zohocrm/php-sdk/src/crm/api/response/CommonAPIResponse.php(76): zcrmsdk\crm\api\response\BulkAPIResponse->handleForFaultyResponses()
#2 .../zohocrm/php-sdk/src/crm/api/response/CommonAPIResponse.php(67): zcrmsdk\crm\api\response\CommonAPIResponse->processResponse()
#3 .../zohocrm/php-sdk/src/crm/api/response/BulkAPIResponse.php(47): zcrmsdk\crm\api\response\CommonAPIResponse->__construct('HTTP/1.1 302 \r\n...', 302)
#4 .../zohocrm/php-sdk/src/crm/api/APIRequest.php(148): zcrmsdk\crm\api\response\BulkAPIResponse->__construct('HTTP/1.1 302 \r\n...', 302)
#5 .../zohocrm/php-sdk/src/crm/api/handler/OrganizationAPIHandler.php(657): zcrmsdk\crm\api\APIRequest->getBulkAPIResponse()
#6 .../zohocrm/php-sdk/src/crm/api/handler/OrganizationAPIHandler.php(746): zcrmsdk\crm\api\handler\OrganizationAPIHandler->getUsers(Array, Array, 'CurrentUser')
#7 .../zohocrm/php-sdk/src/crm/setup/restclient/ZCRMRestClient.php(114): zcrmsdk\crm\api\handler\OrganizationAPIHandler->getCurrentUser()

#8 - #20 PHP framework calls 
#21 {main}

    Access your files securely from anywhere









                          Zoho Developer Community




                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts





                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


                                                                                Zoho Creator Resources



                                                                                    Zoho CRM Resources

                                                                                    • CRM Community Learning Series

                                                                                      CRM Community Learning Series


                                                                                    • Kaizen

                                                                                      Kaizen

                                                                                    • Functions

                                                                                      Functions

                                                                                    • Meetups

                                                                                      Meetups

                                                                                    • Kbase

                                                                                      Kbase

                                                                                    • Resources

                                                                                      Resources

                                                                                    • Digest

                                                                                      Digest

                                                                                    • CRM Marketplace

                                                                                      CRM Marketplace

                                                                                    • MVP Corner

                                                                                      MVP Corner







                                                                                        Design. Discuss. Deliver.

                                                                                        Create visually engaging stories with Zoho Show.

                                                                                        Get Started Now


                                                                                          Zoho Show Resources

                                                                                            Zoho Writer

                                                                                            Get Started. Write Away!

                                                                                            Writer is a powerful online word processor, designed for collaborative work.

                                                                                              Zoho CRM コンテンツ






                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方