Steps to Setup a Webhook
- Develop an HTTP endpoint in your application to receive webhook events.
- Register the development endpoint URL on ChatBrick.
- Test the webhook by triggering an example event.
- Deploy the endpoint to a production environment.
- Register the production endpoint URL on ChatBrick.
- Monitor the webhook events sent to the production endpoint.
1. Develop an HTTP endpoint in your application to receive webhook events.
You can use any programming language or framework to develop the endpoint. The endpoint should be able to receivePOST
requests and process the payload sent by ChatBrick.
You should implement signature verification on your endpoint. Learn more about it in the signature verification documentation.
Upon receiving an event, you should respond with an HTTP 200 OK
to indicate that the event has been successfully processed on your end. If you do not respond with a 2xx
status, the webhook message will be resent with exponential backoff. Learn more about retries in the retries documentation.
2. Register the development endpoint URL on ChatBrick.
Register your development version of the webhook endpoint URL on ChatBrick to verify your implementation. To register, go to 選單 > 系統設定 > 技術人員 > Webhooks 設定.3. Test the webhook by triggering an example event.
After registering the development endpoint URL, you can test the webhook by triggering an example event. To trigger an example event:- Select the webhook endpoint you want to test.
- Click the “Test endpoint…” button.
- Select the event you want to test.
- Click the “Send example” button.