K
Kinde3mo ago
pio0otrek

webhook types

Hello support team. I was looking through docs and internet for webhook types. are the availible anywhere ootb?
4 Replies
Abdelrahman Zaki - Kinde
Hi @pio0otrek, Yes, Kinde provides a set of webhook event types out of the box. You can view and select them directly in the Kinde UI under Settings > Environment > Webhooks when creating or editing a webhook. If you’d prefer to explore them programmatically, you can use the Management API endpoint:
GET /api/v1/event_types
GET /api/v1/event_types
This returns the full list of webhook event types available to your account. Typical categories include: - Authentication events (e.g. user.created, user.authenticated) - User management events (e.g. user.updated, user.deleted, role.created) - Billing events (e.g. customer.payment_succeeded, customer.plan_changed) For the exact event keys and more details, check out our docs here: Add and manage webhooks.
pio0otrek
pio0otrekOP3mo ago
Thank you for your answear 🙂 You are right, it explains events names. But I was talkig more about TS types of event object that are comming to my webhook endpoint. I was trying to use https://github.com/kinde-oss/webhook but it brings much more challenges on nextjs
GitHub
GitHub - kinde-oss/webhook: JS library to decode and validate Kinde...
JS library to decode and validate Kinde webhooks. Contribute to kinde-oss/webhook development by creating an account on GitHub.
pio0otrek
pio0otrekOP3mo ago
⨯ ./src/app/webhooks/kinde/route.ts:4:1 Module not found: Can't resolve '@kinde/webhooks/dist/types' 2 | import jwt from "jsonwebtoken"; 3 | import getJwksClient from "../jwks-client"; 4 | import { WebhookEvent, WebhookEventType } from "@kinde/webhooks/dist/types"; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 5 |
Abdelrahman Zaki - Kinde
Hi @pio0otrek, thanks for clarifying. At the moment the package doesn’t export those types directly. A good approach for now is to define only the event shapes you actually need in your project. I’ll also raise this with our team so we can look at exposing the official types from the package root in a future release. Hi @pio0otrek, we’ve just released @kinde/webhooks v1.1 with the types now exposed, along with a few nice improvements. Hope this makes things smoother for you!

Did you find this page helpful?