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

Solved
swapnilbanga
New Member
4 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

Accepted Solution (1)
Gregarican
Shopify Partner
1030 86 276

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.

View solution in original post

Replies 3 (3)
Gregarican
Shopify Partner
1030 86 276

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.

swapnilbanga
New Member
4 0 0

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

Gregarican
Shopify Partner
1030 86 276

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!