I tried to set the X-Shopify-Access-Token request header with a POST request to the products endpoint, as advised in other posts here in the community.
I used the value of the password of the private app and I think all relevant permissions are granted.
PUT and GET requests work fine.
But I am still receiving 200 - OK instead of 201 - Created.
I am working with VBA for Excel
Solved! Go to the solution
For the community:
I could bypass the cookies restriction by deleting them through the shell before sending the request.
After cleaning the cookies you can forget about X-Shopify-Access-Token header.
I think this is very specific to the machine setup but maybe can be helpful to others working with VBA
'Cleaning cookies and other internet files through the shell
Dim wsh As Object: Set wsh = VBA.CreateObject("WScript.Shell") wsh.Run "RunDll32.exe InetCpl.Cpl, ClearMyTracksByProcess 8", vbHide, True wsh.Run "RunDll32.exe InetCpl.Cpl, ClearMyTracksByProcess 2", vbHide, True wsh.Run "RunDll32.exe InetCpl.Cpl, ClearMyTracksByProcess 11", vbHide, True 'Sending the xhr xmlhttp.Open "POST", url, False xmlhttp.setRequestHeader "Content-type", "application/json" xmlhttp.send (json)
|12-13-2019 10:28 PM|
|12-11-2019 07:05 AM|
|12-06-2019 05:25 AM|
|12-04-2019 07:20 AM|
|12-04-2019 06:59 AM|