All kind of POST in Order API redirects me to Shopify Admin Login (Html)

Glimark_Indones
New Member
2 0 3

Hello,

I'm creating an internal application that connects to Shopify Order API. Using Postman, I got a 200 OK response, but obviously there was no change related to the order (create new, close, cancel) because it returned an HTML body of Shopify admin login page.

There is no problem with the authentication (because I can use GET, the credential was set using basic auth in Postman), JSON formatting is okay.

For example, this simple POST request returns 200 OK but with Shopify Admin Login HTML: "https://myurl.com/admin/orders/5615918161/cancel.json"

I observe that this also happen for several POST request in another APIs.

Glimark_Indones
New Member
2 0 3

Additional information:
I only experience this when making request using HTTP, while cURL returns the right response.

Why is that?

Priti
Tourist
5 0 1

I am also receving the HTML response when called via code for my private app. Any clue what might be wrong ?

0 Likes
Vadik
New Member
2 0 0

Exactly the same issue here.
Any updates?

0 Likes
Jason
Shopify Expert
10296 146 1949

If you're getting the HTML login page response I can make a fairly strong assumption that you're sending cookies in your POST. The server will block any change request that includes header cookies.

You'll be able to test this easily in the desktop version of Postman since that tool will let you remove/include header cookies. 

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 ★
Vadik
New Member
2 0 0

Thank you very much Jason
That was helpful!

0 Likes
Wolf7967
Tourist
7 0 0

Thank you so much. I was stuck on this for a long time. 

0 Likes