Product update API call working, but Product create API call fails.

jfkScollar
Shopify Partner
10 0 0

Hello,

I have an Excel VBA macro that updates products using the PUT https://{myshopname}/myshopify.com/admin/api/2021-07/products/{productid}.json call and it works fine. When I try and create a product using POST https://{myshopname}/myshopify.com/admin/api/2021-07/products.json it fails. It returns HTML code in the response body. The same product JSON package can create a product making the same call in Postman.

Any suggestions on why it may not work in Excel VBA yet PUT works in Excel VBA?

Thanks,

John

 

Reply 1 (1)
jfkScollar
Shopify Partner
10 0 0

I found a message that was a similar issue, and it appears cookies prevent the POST from working in VBA.

The solution (with VBA code) is found in the message below.

https://community.shopify.com/c/Shopify-APIs-and-SDKs/X-Shopify-Access-Token-Not-working-with-Privat...

Thanks,

John