You can use Flock's webhooks to send and receive messages from external services using JSON packets. An outgoing webhook sends messages from a Flock channel to an external service.
Before you create an outgoing webhook, you'll need to set up a Callback URL - an HTTP/HTTPS endpoint on your server that accepts JSON payloads. E.g. https://api.yourservice.com/callback
The messages are posted to your endpoint with the HTTP headers Content-Type: application/json; and Accept-Encoding: gzip, deflate. The JSON payload is in the body. If you need help setting up your callback URL, contact developer support.
Create an outgoing webhook
- Navigate to the Flock Developer Dashboard at https://dev.flock.com.
- Sign in with your Flock account and click Webhooks on the left.
- Choose to Add an Outgoing Webhook.
- Set the Channel where the webhook should look for messages to send to an external service.
- Give the webhook a name and an icon that will be used to post replies in Flock.
- Enter the Callback URL that Flock should send your messages to.
- Click on Save Settings. The outgoing webhook will post JSON packets to the Callback URL in the following format:
- A ?token=<webhook-token> is appended to the callback URL while making the call so you can verify that the request came from Flock. For more info, see Flock API Documentation.
|alert-warning||The number of webhooks that can be created as per the current standard is 10 per user.|