Questions and discussions about using the Shopify CLI and Shopify-built libraries.
Hi all,
I am using the shopifyApp from @Shopify/shopify-app-express to setup the Shopify webserver but I keep running into this error:
Failed to process webhook: Error: Could not validate request HMAC
I suspect that I am not passing the correct hostName to the api key but not sure how to fix this issue.
Can someone please help me understand what I am doing wrong? Thank you!
The setup:
const shopify = shopifyApp({
api: {
apiVersion: LATEST_API_VERSION,
restResources,
billing: undefined,
apiKey: 'hidden',
apiSecretKey: 'hidden',
accessMode: 'offline',
scopes: ['read_products','write_products','write_customers','write_draft_orders','unauthenticated_read_product_listings','read_product_listings','unauthenticated_write_checkouts'],
hostScheme: 'http',
hostName: 'localhost:3030',
isEmbeddedApp: true,
},
auth: {
path: "/api/auth",
callbackPath: "/api/auth/callback",
},
webhooks: {
path: "/api/webhooks",
},
sessionStorage: new CustomSessionStorage()
});
Anyone? I'm facing the same problem and can't find a solution.