Welcome to the Kinde community.

P
K
A
A
A

Fastify webhooks error unexpected token in json payload

I'm trying to setup webhooks for my backend, which is a NestJS app that uses Fastify under the hood. I get the following error whenever I try to accept a request.

{
  message: `Unexpected token 'e', "eyJhbGciOi"... is not valid JSON`,
  error: 'Bad Request',
  statusCode: 400
}

D
B
7 comments

We don't send JSON over out webhooks, we send a signed JWT. See more details here: https://docs.kinde.com/integrate/webhooks/add-manage-webhooks/#webhook-security


note: this examples is not using our new standalone packages yet.

Do you have an example postman script I can use to test this. So I am not constantly having to make changes in the UI?

That would be great, doesn't have to be real. Just an example of what is actually sent so I can work out what I might need to change

Is there a specific event you're after?

I'm working on org / user events, but my issue I believe is with how the body is parsed

So I need to understand more about that

Add a reply
Sign up and join the conversation on Slack
Join