I catch ZohoOAuthException
Hi! I have a problem with my code:
- require 'vendor/autoload.php';
- ZCRMRestClient::initialize();
- try {
- $oAuthClient = ZohoOAuth::getClientInstance();
- $grantToken = '1000.297767e7a02214c5e4432dcc1906f615.c1198106e59644b6539e110f684f4a27';
- $oAuthTokens = $oAuthClient->generateAccessToken($grantToken);
- }
- catch (ZohoOAuthException $e)
- {
- echo $e;
- }
result:
- Notice: Undefined offset: 1 in D:\phpProjects\zoho_form\vendor\zohocrm\php-sdk\src\com\zoho\oauth\client\ZohoOAuthClient.php on line 185
- Warning: array_key_exists() expects parameter 2 to be array, null given in D:\phpProjects\zoho_form\vendor\zohocrm\php-sdk\src\com\zoho\oauth\client\ZohoOAuthClient.php on line 75
- ZohoOAuthException Caused by:'ZohoOAuthException Caused by:'Exception while fetching access token from grant token - ' in D:\phpProjects\zoho_form\vendor\zohocrm\php-sdk\src\com\zoho\oauth\client\ZohoOAuthClient.php(84) #0 D:\phpProjects\zoho_form\index.php(13): ZohoOAuthClient->generateAccessToken('1000.297767e7a0...') #1 {main}' in D:\phpProjects\zoho_form\vendor\zohocrm\php-sdk\src\com\zoho\oauth\client\ZohoOAuthClient.php(89) #0 D:\phpProjects\zoho_form\index.php(13): ZohoOAuthClient->generateAccessToken('1000.297767e7a0...') #1 {main}
oauth_configuration.properties:
- client_id=1000.OTCDIJOE18HT67830HKG6N4CJXRBDW
- client_secret=69c494c84e52120321ca8f1f0f5ce4cfb6f3973270
- redirect_uri=http://127.0.0.1:8080
- accounts_url=https://accounts.zoho.eu
- token_persistence_path=zcrm_oauthtokens.txt
- access_type=offline
- persistence_handler_class=ZohoOAuthPersistenceHandler
What am I doing wrong?