skip to Main Content

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:

enter image description here

3

Answers


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

    Image from Postman

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
  3. It’s Seems to you not passing shopify token to your postman request. So please pass “X-Shopify-Access-Token ” to request header

    enter image description here

    It will solve your problem

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search