Create order admin REST api returns HTML instead of success response with the created order

Solved
Highlighted
New Member
3 0 0

So I followed these docs 
https://shopify.dev/docs/admin-api/rest/reference/orders/order#create-2020-10
To try and create an order through postman
In the response, I get some HTML with a link that asks me to authenticate and then goes to error
I tried fetch orders request and that worked fine. I have tried changing inputs and using shopify example inputs.
Not sure what's going on here.
Screenshot 2020-11-10 at 9.31.46 PM.png

0 Likes
Highlighted
Shopify Partner
661 46 132

This is an accepted solution.

If you've verified the API credentials are okay, then it's likely due to Postman sending client-side cookies with the API request. You need to clear those out and disable that setting option.

Highlighted
New Member
3 0 0

That seems to work
It won't be a problem when I am making the request with a library like axios right?

0 Likes
Highlighted
Shopify Partner
661 46 132

As long as Axios isn't automatically sending client-side cookies behind the scenes for POST requests you should be fine. I'd assume the developer has control over how it's behaving, so you should be good!

0 Likes