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

Solved
Eyal_A770
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?

 

Jason
Shopify Expert
10360 158 2009

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...

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
Mark_Johnson3
Shopify Partner
2 0 5

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.

Lux-Capacitor
Tourist
6 0 4

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
Preethi
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
RogerC
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
Ruby_Lauruss12
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
AustinHutchison
Shopify Expert
46 1 11

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
begyourpardon
New Member
3 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