For the CarrierService callback_url, looking for the recommended way to verify the requests coming in on my callback_url are from Shopify. I tried using:
export async function action({ request }) {
const { } = await authenticate.webhook(request);
return json({ ... })
};
But that gave a 400 error.
I see there is a signature header: x-shopify-hmac-sha256
Is that the recommended mechanism to verify the authenticity of the request? Anything in the shopify-api-js lib I can use the validate this, or do I have to hand-write something?
Certainly this isn’t expected to be a purely public API allowing just anyone to call it - what am I missing?