Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

Solved

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

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?

 

Accepted Solution (1)

Jason
Shopify Partner
11206 226 2315

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 in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★

View solution in original post

Replies 9 (9)

Jason
Shopify Partner
11206 226 2315

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 in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
RogerC
Shopify Partner
4 0 6

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


 

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

Mark_Johnson3
Shopify Partner
4 0 6

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
7 0 6

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.

friendoftheroot
Shopify Partner
50 5 8

The desktop version however allows to do this, and makes it very easy. There is a link below the Send button. It shows you all the cookies.

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

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



AustinHutchison
Shopify Partner
52 1 18

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.