remix app mandatory webhooks returning 400

Solved

remix app mandatory webhooks returning 400

harsh_mishra
Shopify Partner
3 0 0

I am using shopify remix template and I need to configure mandatory webhooks. The APP_UNINSTALLED  webhook is working fine. But when I am writing mandatory one with URL
https://example.com/webhooks/customers/data_request
https://example.com/webhooks/customers/redact
https://example.com/webhooks/shop/redact

On hitting these urls they gives 404.

I have registered webhooks in shopify.js file . I am not sure what I am doing wrong.

webhooks: {
    APP_UNINSTALLED: {
      deliveryMethod: DeliveryMethod.Http,
      callbackUrl: "/webhooks",
    },
    CUSTOMERS_DATA_REQUEST: {
      deliveryMethod: DeliveryMethod.Http,
      callbackUrl: "/webhooks",
     // topic: "customers/data_request",
    },
    CUSTOMERS_REDACT: {
      deliveryMethod: DeliveryMethod.Http,
      callbackUrl: "/webhooks",
      //topic: "customers/redact",
    },
    SHOP_REDACT: {
      deliveryMethod: DeliveryMethod.Http,
      callbackUrl: "/webhooks",
      //topic: "shop/redact",
    },
  },
Accepted Solution (1)

Sunil-Kumar
Excursionist
16 1 1

This is an accepted solution.

Shopify don't register mandatory webhooks except App-Uninstalled so you need to create post routes for other three webhooks and verify the HMAC from request header and if HMAC is valid return or Redact the data and if not valid return http request status 401. 

SK

View solution in original post

Replies 3 (3)

Sunil-Kumar
Excursionist
16 1 1

This is an accepted solution.

Shopify don't register mandatory webhooks except App-Uninstalled so you need to create post routes for other three webhooks and verify the HMAC from request header and if HMAC is valid return or Redact the data and if not valid return http request status 401. 

SK
Juanestban
Shopify Partner
8 2 1

do you could have a template for this three weebhook  mandatory for can see that?

Khangthedev303
Shopify Partner
5 0 1