No Content Exception Error in Zoho Api v2 in php sdk - php

Hi I hope everybody is doing well
I am trying to add leads to Zoho CRM using API v2, now for that, if the user already there I will update its record if a user is not there I will create a new record into it, right now I am finding out a way to handle the exception error when there is not any user in CRM it displays this line
Fatal error: Uncaught zcrmsdk\crm\exception\ZCRMException Caused by:'No Content' in C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\BulkAPIResponse.php(61) #0 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\CommonAPIResponse.php(76): zcrmsdk\crm\api\response\BulkAPIResponse->handleForFaultyResponses() #1 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\CommonAPIResponse.php(67): zcrmsdk\crm\api\response\CommonAPIResponse->processResponse() #2 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\BulkAPIResponse.php(47): zcrmsdk\crm\api\response\CommonAPIResponse->__construct('HTTP/1.1 204 \r\n...', 204) #3 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\APIRequest.php(148): zcrmsdk\crm\api\response\BulkAPIResponse->__construct('HTTP/1.1 204 \r\n...', 204) #4 C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\handler\MassEntityAPIHandler.php(327): zcrmsdk\crm\api\APIRequest->getBulkAPIResponse() #5 C:\xampp\htdocs\crmint2\vendor\zoh in C:\xampp\htdocs\crmint2\vendor\zohocrm\php-sdk\src\crm\api\response\BulkAPIResponse.php on line 61
Now I have tried try and catch statement as well but it stucks here and crashes the application, I am looking forward to someone who had gone through this and was successful in implementing it

Related

Google SSO aouth 2.0 gives Error fetching OAuth2 access token, message: 'invalid_grant: Code was already redeemed.'

I have sign in with google enable in my website it is working fine since last 3-4 month but from yesterday it start giving me following error on every 4-5 minuites
Fatal error: Uncaught exception 'Google_Auth_Exception' with message
'Error fetching OAuth2 access token, message: 'invalid_grant: Code was
already redeemed.'' in
F:\ServerFolders\Projects\domain.com\src\Google\Client.php(131):
Google_Auth_OAuth2->authenticate('4/8hj0saqecCytQ...', false) #1
F:\ServerFolders\Projects\domain.com\application\libraries\NV_gmail.php(105):
Google_Client->authenticate('4/8hj0saqecCytQ...') #2
F:\ServerFolders\Projects\domain.com\application\libraries\layout.php(51):
NV_gmail->login() #3
F:\ServerFolders\Projects\tl-l.com\application\controllers\dashboard.php(19):
layout->header() #4 [internal function]: dashboard->index() #5
F:\ServerFolders\Projects\domain.com\system\core\CodeIgniter.php(359):
call_user_func_array(Array, Array) #6
F:\ServerFolders\Projects\domain.com\index.php(202):
require_once('F:\ServerFolder...') #7 {main} thrown in
F:\ServerFolders\Projects\domain.com\src\Google\Auth\OAuth2.php on
line 126
And shows blank page .
When the user clicks authenticate you are given an authentication code. You take this code and exchange it for your access token and refresh token.
'invalid_grant: Code was already redeemed
Means that you are taking an authentication code that has already been used and trying to get another access token / refresh token for it.
If it has worked for the last 4 months my opinion is that someone changed something in your code and broke it.
Change
curl_setopt($curl, CURLOPT_SSLVERSION, 3);
to
//curl_setopt($curl, CURLOPT_SSLVERSION, 3);
from curl.php according to github.com/google/google-api-php-client/issues/639 and now working fine

Gitkit_ServerException: Error code: 17

I'm attempting to implement the password reset flow for Google Identity Toolkit with the php sdk. I am able to use the sdk to do everything needed except setting up the mail endpoint which exits with the following error.
Here is the code that generates the exception:
try {
$oobResult = $gitkitClient->getOobResults();
echo $oobResult['response_body'];
}
catch (Exception $e) {
print "Exception $e";
}
And the exception:
Exception exception 'Gitkit_ServerException' with message 'Error code: 17' in C:\...\vendor\google\identity-toolkit-php-client\src\RpcHelper.php:229
Stack trace:
#0 C:\...\vendor\google\identity-toolkit-php-client\src\RpcHelper.php(208): Gitkit_RpcHelper->checkGitkitError(Array)
#1 C:\...\vendor\google\identity-toolkit-php-client\src\RpcHelper.php(179): Gitkit_RpcHelper->invokeGitkitApiWithServiceAccount('getOobConfirmat...', Array)
#2 C:\...\vendor\google\identity-toolkit-php-client\src\GitkitClient.php(371): Gitkit_RpcHelper->getOobCode(Array)
#3 C:\...\vendor\google\identity-toolkit-php-client\src\GitkitClient.php(299): Gitkit_Client->buildOobLink(Array, 'resetPassword')
#4 C:\...\auth\mail.php(14): Gitkit_Client->getOobResults(Array, '192.168.1.1')
Does anyone know what this error indicates and how to resolve it?
This function from the readme.md generates the same 'Error code: 17'
$gitkitClient->getEmailVerificationLink("emailgoeshere");
These functions from the readme.md do work as expected:
$gitkitClient->getUserById("useridgoeshere");
$gitkitClient->deleteUser("useridgoeshere");
$gitkitClient->getAllUsers(3);
This is caused by a known issue on Identity Toolkit and is now fixed. Can you go the Google Developer Console and make sure you have the correct send email endpoint in your Identity Toolkit config? Also make sure you put the same send email endpoint in your widget config. It should work now.

Couldn't resolve host '1511623453.cloud.vimeo.com'

Alright... I've chased the trail around the internet for this one, and I'm coming up with nothing.
Trying to use the PHP Vimeo API to upload videos. I have upload permission on my app, I've got tokens, and client id and secret stuff all set up, and a small myriad of other things that I've put together to make everything work... and... now I'm getting this and I have no idea what to do with it :P
PHP Fatal error: Uncaught exception 'Vimeo\Exceptions\VimeoRequestException' with message 'Unable to complete request.[Couldn't resolve host '1511623453.cloud.vimeo.com']' in /home/theo/software-dev/classes/vimeo/src/Vimeo/Vimeo.php:154 Stack trace:
#0 /home/theo/software-dev/classes/vimeo/src/Vimeo/Vimeo.php(396): Vimeo\Vimeo->_request('https://1511623...', Array)
#1 /home/theo/software-dev/classes/vimeo/src/Vimeo/Vimeo.php(320): Vimeo\Vimeo->perform_upload('users/test/outp...', Array)
#2 /home/theo/software-dev/vim_test.php(20): Vimeo\Vimeo->upload('users/test/outp...', false)
#3 {main} thrown in /home/theo/software-dev/classes/vimeo/src/Vimeo/Vimeo.php on line 154
The upload script is super simple, and I doubt to be the source of the error, though here it is:
1 <?php
2 include("./config/vim.php");
3 require("./classes/vimeo/autoload.php");
4
5 $lib = new \Vimeo\Vimeo($client_id, $client_secret);
6
7 $lib->setToken($token);
8
9 $response = $lib->upload('users/test/output.mp4', false);
Any suggestions or thoughts?
Thanks!
Try and close all the browers on the computer or phone then make sure your api has the lastet version.

How to test google market place api with php

I'm trying to use this api http://code.google.com/p/android-market-api/. I would like to get some that from play store. like App name, description, screenshots and download rating(total downloads, week downloads....)
I'm using the php version. I uploaded all the code to my personal server. www.example.com/test/.
Should I configure anything else in addition of local.php, email and password fields? I only did that.
I have this error:
Uncaught exception 'Exception' with message 'HTTP request returned code 400' in /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php:212 Stack trace:
#0 /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php(160): MarketSession->executeRawHttpQuery('??????DQAAAMkAA...')
#1 /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php(147): MarketSession->executeProtobuf(Object(Request))
#2 /homepages/31/d229886149/htdocs/carlos/test/examples/test_categories.php(15): MarketSession->execute(Object(Request_RequestGroup))
#3 {main} thrown in /homepages/31/d229886149/htdocs/carlos/test/Market/MarketSession.php
on line 212
Thank you.
After that I would like to implement it with codeIgniter
try with '0123456789123456' as an ANDROID_DEVICEID
define('GOOGLE_EMAIL','someone#gmail.com');
define('GOOGLE_PASSWD','SomePassword');
define('ANDROID_DEVICEID','0123456789123456');

Amazon soap interface using php

Hi i am trying to use soap to get results from amazon, and i havent tried this before so i was trying some sample code. The problem is i get an error.
the code is this:
<?php
#Use the NuSOAP php library
//require_once('lib/nusoap.php');
$params->AWSAccessKeyId = AMAZON_API_KEY;
$params->Request->SearchIndex = 'Books';
$params->Request->Keywords = 'php5';
$amazon = new SoapClient('http://webservices.amazon.com/AWSECommerceService /AWSECommerceService.wsdl');
$result = $amazon->itemSearch($params);
echo $result;
?>
and this is the error i get when i run it. thanx for your time
Fatal error: Uncaught SoapFault exception: [aws:Client.MissingParameter] The request must contain the parameter Signature. in C:\wamp\www\amasearch.php:11 Stack trace: #0 [internal function]: SoapClient->__call('itemSearch', Array) #1 C:\wamp\www\amasearch.php(11): SoapClient->itemSearch(Object(stdClass)) #2 {main} thrown in C:\wamp\www\amasearch.php on line 11
Weird. The WSDL doesn't have a signature parameter for any type. BUT, I found this in Amazon dev forums. Recommend you to check it out (also, if you develop using amazon services, keep that resource at hand
https://forums.aws.amazon.com/ann.jspa?annID=483
Looks like security gates for services are now taller and bigger, mate
EDIT: This question link to some example in C#. Maybe it can help you out Amazon (AWS) - The request must contain the parameter Signature
And this is an example in AWS forums with PHP https://forums.aws.amazon.com/message.jspa?messageID=149715

Categories