Open mohdaftab opened 6 years ago
Hi @mohdaftab ,
I am facing same issue whenever i am passing Data then it throwing ERROR #22 , To solve this issue i have passed parameter with URL as query parameter
$call = $sh->call(['URL' => 'products.json?limit=5&published_status=any', 'METHOD' => 'GET', ]);
And it is working fine now. You can try this and if you got any other solution please also share.
I have solved it by commenting out these 2 lines in the api.php file
CURLOPT_FAILONERROR => $request['FAILONERROR'], CURLOPT_VERBOSE => $request['ALLDATA'],
@gurjanjua's solution worked for me.
ditto - @gurjanjua's solution was the ticket. Any idea why? This was working fine for us until now.
@gurjanjua solution worked. What gives?
The problem is that Shopify has updated their server standards: https://ecommerce.shopify.com/c/shopify-apis-and-technology/t/shopify-api-call-returns-a-http-400-error-with-html-from-google-484157
Basically, you are not allowed to pass body data with a GET request anymore. This wrapper isn't updated to handle that case yet. I was able to resolve in my code performing the call like this instead passing as 'DATA' (see commented out code).
$call = $sh->call(
[
'URL' => "/products.json?limit=$perPage&page=$i",
'METHOD' => 'GET',
// 'DATA' =>
// [
// 'limit' => $perPage,
// 'page' => $i
// ]
]);
@calebl THANK YOU! This worked for me
@calebl It's work for me Thank You
Hello, I am getting this error when I try to use call function. ERROR #22: The requested URL returned error: 400 Bad Request