Set up Webhook Event Notification
This topic describes how to set up webhook event notifications, so that third-party applications can get real-time notifications for specific events occur on Yeastar Workplace.
Prerequisites
- You have enabled API feature on Yeastar Workplace.
- You have obtained a publicly accessible webhook URL from the third-party application.
Step1. Set up a webhook on Yeastar Workplace
- Log in to Yeastar Workplace admin portal, go to .
- Click Settings beside API.
- In the pop-up window, configure the webhook:
- In the Callback URI field, enter the Webhook URL obtained from the third-party application.
- Optional: Click Test
to check if the webhook is working properly.
The third-party application will receive a "WEBHOOK_TEST" event.
- Click Save.
Step2. Subscribe to desired events
After seting up a webhook, you need to send an event subscription API request to
subscribe to specific event(s). In this way, Yeastar Workplace can proactively send
notifications to the third-party application when the subscribed event occurs.
- Check the desired event type(s) in Webhook event types.
- Compose an event subscription API request in the following format, then send
the request.Note: If you want to subscribe to all webhook events, set the
eventTypes
parameter toALL
. For more information, see Event Subscription API.
The event subscription request is sent to the predefined callback URI.POST {base_url}/services/openapi/v1.0/integration/subscribe Authorization: Bearer {access_token} Content-Type: application/json { "eventTypes": [ "eventType1","eventType2",...] }
Result
When a subscribed event occurs, Yeastar Workplace sends a notification to the predefined callback URI (namely the Webhook URL of the third-party application), informing the third-party application of the event in real time.