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

For security reasons, requests using HTTP Basic Authentication cannot include cookies

Open oscarfabiano opened this issue 3 years ago • 3 comments

Hello, Recently I've started receiving this error when trying to fulfill orders on Shopify.

For security reasons, requests using HTTP Basic Authentication cannot include cookies

$this->config = array( 'ShopUrl' => env('API_SHOPIFY_STORE_NAME') . '.myshopify.com', 'ApiKey' => env('API_SHOPIFY_KEY'), 'Password' => env('API_SHOPIFY_PASSWORD'), 'ApiVersion' => '2021-01' );

Any clue? Should I send any extra parameters?

Thanks,

oscarfabiano avatar Jan 05 '21 17:01 oscarfabiano

Same here, looking for some clue...

driade avatar Jan 05 '21 18:01 driade

Hey guys, I am experiencing the same issue here. I found a temporary solution and it's by disabling the session cookies before running any POST requests. Just remember to enable this option again once the request is sent.

     ini_set('session.use_cookies', '0');
     // Code goes here
     ini_set('session.use_cookies', '1');

Hope it works for you.

Thanks,

jonada182 avatar Jan 05 '21 18:01 jonada182

@jonada182 Thanks a lot. It's incredible it works in my case, because it runs on a queue without (supposedly) sessions!

driade avatar Jan 05 '21 18:01 driade