I need to create a webhook in shopify using Postman.
I have entered following:
Method: POST
URL: https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/webhooks.json
Parameters:
{
"topic": "order/creation",
"address": "https://example.com/shopify_app/order_created.php"
}
Headers:
[{"key":"Content-Type","value":"application/json","description":""}]
I have replaced {{api_key}}
with API key created while creating the app, and {{api_password}}
with the access_token.
When I hit this, I get “Please log in” screen. Please check below image:
3
Answers
The URL has to be the same format as yours.
URL: https://{{api_key}}:{{api_password}}@{{store_name}}.myshopify.com/admin/webhooks.json
But have to enter the arguments in the Postman like this:
Key = Value
webhook[topic] = orders/create
webhook[address] = https://whatever.hostname.com/
webhook[format] = json
( to build that json format logic into the post data )
Yeah this seems weird. Most probably you’re sending cookies with your request.
Click on
Cookies
below to the send button and clear all the cookies and try to make POST request again. It will work.It’s Seems to you not passing shopify token to your postman request. So please pass “X-Shopify-Access-Token ” to request header
It will solve your problem