shopify-php-sdk icon indicating copy to clipboard operation
shopify-php-sdk copied to clipboard

How to set api version?

Open usfox opened this issue 5 years ago • 2 comments

Hi,

Thank you code, But I use your code have a question, New API version is 2020-01, but I call you SDK, Return is an error, How to use API version in this SDK?

PHP Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: GET https://xxxx.myshopify.com/admin/api/products.json resulted in a 404 Not Found response:

usfox avatar Feb 18 '20 08:02 usfox

use

$client = new PrivateApi(array(
                'api_version' => '2020-01/',
                'api_key' => 'SHOPIFY_USERNAME',
                'password' => 'SHOPIFY_PASSOWORD',
                'shared_secret' => '',
                'myshopify_domain' => 'SHOPFIY_STORENAME'
            ));

see slash ... there is bug in code so we have to use slash in api_version

gomcodoctor avatar Feb 29 '20 11:02 gomcodoctor

@gomcodoctor - Thanks, that worked

IsaiahN avatar Oct 14 '20 17:10 IsaiahN