#Robert Fonzarely

1 messages ยท Page 1 of 1 (latest)

lilac scaffoldBOT
pearl wasp
#

Hello ๐Ÿ‘‹
Signature verification shouldn't be affected by that. Few of the common culprits here are

  • Your webhook endpoint using an incorrect signing secret
  • Your server parsing the raw event body to a different format before it reaches your event handler
craggy pasture
#

Ok, I see. The API server is NextJs, so the webhook takes req.body. Do I have to format the json before checking ?

pearl wasp
#

If you have a parser that runs and formats incoming payloads to let's say JSON then that would be an issue as the constructEvent function expects raw body

craggy pasture
#

The error log show me the correct key

pearl wasp
#

No you shouldn't format it to JSON
It shouldn't be touched.

#

Typically in node projects, I've seen bodyParser (or something similar) parsing the body automatically.
You'd likely want to configure your route to NOT parse the body.

craggy pasture
pearl wasp
#

Ah nice, lmk if you need additional help ๐Ÿ™‚