Why do I need a webhook and how does it work?
Webhooks are user-defined HTTP callbacks that are triggered by specific events and enable asynchronous event delivery (notifications, messages, etc.). Webhooks are called by tyntec’s WhatsApp Business API by a callback URL.
You can use webhooks in two ways:
- Inbound Notifications: Use it to get a notification when you have received a message.
- Message Status Notifications: Monitor the status of sent messages.
The tyntec API is using webhooks for delivery of incoming messages to your WABA. We need to expose an HTTP endpoint by implementing the `POST’ HTTP method to set up the webhook URL with tyntec. This endpoint of your application will be responsible for processing the incoming messages.
The Conversations API triggers the webhook on the following events (configurable):
MessageStatus::accepted MessageStatus::delivered MessageStatus::seen MessageStatus::failed MessageStatus::channelFailed MessageStatus::deleted MoMessage WhatsAppGroupEvent::userJoined WhatsAppGroupEvent::userLeft WhatsAppGroupEvent::subjectChanged WhatsAppGroupEvent::descriptionChanged
Note: Companies integrating tyntec’s API for WhatsApp Business should define webhook URLs for incoming messages and delivery notifications.
Due to security reasons, your setup with tyntec must be encrypted, and therefore we accept only HTTPS webhooks. Please be aware that a certificate from an official Certificate Authority (CA) is needed.