SHOPIFY API POST requests do not work with POSTMAN on Private Apps

Solved
Highlighted
Shopify Partner
2 0 1

Hi All,

I'm trying to make a very basic POST request for a private app.

I am working with postman EXACTLY as described here:

https://help.shopify.com/api/tutorials/using-postman

Unfortunately, It is not working. It returns status 200 and return an html page that says : "Log in to manage your store"...

Needles to say, it does not apply any changes to the shop.

For some reason, GET requests work fine while all POST requests fail.

Does anyone have a clue?

 

1 Like
Highlighted
Shopify Expert
9930 105 1766

This is an accepted solution.

Are you sending cookies in the request?

Remove those and you should start to see better results. If you can't do this consider using the X-Shopify-Access-Token method as described here:
https://help.shopify.com/api/getting-started/authentication/oauth#step-4-making-authenticated-reques...

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
6 Likes
Highlighted
Shopify Partner
2 0 4

Thanks, Jason! That was helpful.

For anyone else who comes across this issue, you can find the option to edit cookies below the "Send" button. Removing all of them by clicking the "x" allowed me to make post requests successfully.

4 Likes
Highlighted
Tourist
6 0 2

This should be pinned to the top of the API section. POSTMAN is a terrible API development tool - the chrome app version doesn't even let you get rid of the cookies. Migrated my calls to PAW and it worked flawlessly without extra added cookie junk. 

Thank you for this post!

- Lux.

0 Likes
Highlighted
New Member
3 0 0

I have tried "X-Shopify-Access-Token" token with my ajax request. Still cookies are enabled. I am making ajax request from shopify template.

0 Likes
Highlighted
Tourist
4 0 3

Thank again Jason!! This took me a little to find and fix!


@Jason wrote:

Are you sending cookies in the request?

Remove those and you should start to see better results. If you can't do this consider using the X-Shopify-Access-Token method as described here:
https://help.shopify.com/api/getting-started/authentication/oauth#step-4-making-authenticated-reques...


 

0 Likes
Highlighted
New Member
1 0 0

Screenshot 2019-06-24 at 2.41.24 PM.pngScreenshot 2019-06-24 at 2.44.13 PM.png

I use Private App. When I usedX-Shopify-Access-Token get response like screenshot. When I used Basic Authorization get HTML Response. Please help me.



0 Likes
Highlighted
Shopify Expert
44 1 9

Was running into this issue and found that I needed to download the latest version of the Postman **NATIVE** app to get this to work. Triple check you're using the native app, because I thought I was and it was actually a desktop launcher for a chrome extension.

0 Likes
Highlighted
New Member
2 0 0

Removing the cookies from Postman fixed my strange issue of getting the Shopify login screen returned in HTML instead of the JSON response when creating a new customer. Thanks for the tip Jason! Not sure what causes those cookies, but at least i have a fix.

0 Likes