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:
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...
Jump to solution
4 Replies
Solution
James Perkins
James Perkins2y ago
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
James Perkins
James Perkins2y ago
then make sure this endpoint is not page protected by clerk.
Luc Ledo
Luc LedoOP2y ago
alright, thanks
James Perkins
James Perkins2y ago
if you have an issue implementing fees free to hit me up here on Clerks discord
Want results from more Discord servers?
Add your server