Clerk webhooks
begining the events
- tags
- clerk
- webhooks
- nextjs
Contents
We're going to follow along with the sync data instructions from clerk.
After setting up ngrok
and opening the tunnel to our side, lets add in an api call.
Add the webhook
- Go to clerk dashboard and add a webhook.
- Add an endpoint to your domain, for example https://moved-werewolf-especially.ngrok-free.app/api/webhooks/clerk
- Check the
user
endpoint. - Get the signing secret from the created endpoint and put it in
.env.local
|
|
Install svix
|
|
And now make the endpoint. Here we are looking for the user.created
event and sending out the sendWelcomeEmail
.
|
|
Deploy to production
For this to work right, you'll need to setup a domain and configure all of the your oauth providers. I haven't done this yet so this will only work in development mode.
Previously
Next