Shopify / shopify-app-template-node

MIT License
892 stars 402 forks source link

GDPR webhook seems broken (or the shopify #1270

Closed urimerhav closed 1 year ago

urimerhav commented 1 year ago

Issue summary

I'm trying to implement the GDPR compliance.

Code couldn't be simpler.

  1. I edited the endpoint to return a success payload (see code below).
  2. I used shopify CLI to trigger the customers/
  3. I observe in the logs

2023-05-21 02:24:42 │ backend │ [shopify-app/ERROR] Failed to process webhook: Error: Could not validate request for topic customers/data_request

I would expect the CLI to generate a valid request, and assume the way our template to validate them correctly. What am I missing?

gdpr.js

export default { /**

urimerhav commented 1 year ago

Closing this - SHOPIFY_API_KEY/SECRET was wrong.

If anyone's having issues with this in the future, run shopify app env pull just to make sure you're using the right keys