How to use webhook with tRPC?
What endpoint should I set for the webhook? https://example.app/api/trpc/example ?
And how would I receive the req from the tRPC router?
More specifically, I'm trying to use Clerk's webhook.
Solution:Jump to solution
my advise don’t use tRPC for this use a separate api endpoint e.g /api/webhook.
Otherwise if you really want to, create a router call webhooks, procedure called user.
then it would be /api/trpc/webhooks.user...
4 Replies
Solution
my advise don’t use tRPC for this use a separate api endpoint e.g /api/webhook.
Otherwise if you really want to, create a router call webhooks, procedure called user.
then it would be /api/trpc/webhooks.user
then make sure this endpoint is not page protected by clerk.
alright, thanks
if you have an issue implementing fees free to hit me up here on Clerks discord