Webhooks allows you to receive real-time HTTP notifications Security Audit Log updates. This ensures you don't have to query the Graph API for changes to objects that may or may not have happened, and helps you avoid reaching your rate limit.
Webhooks are sent using HTTPS, so your server must must be able to receive and process HTTPS requests, and it must have a valid TLS/SSL certificate installed. Self-signed certificates are not supported.
This step must be completed before you can subscribe to any webhook fields in the App Dashboard.
Your endpoint must be able to process two types of HTTPS requests: Verification Requests and Event Notifications. Since both requests use HTTPs, your server must have a valid TLS or SSL certificate correctly configured and installed. Self-signed certificates are not supported.
The sections below explain what will be in each type of request and how to respond to them. Alternatively, you can use our sample app which is already configured to process these requests.
Anytime you configure the Webhooks product in the Admin Center, we'll send a GET request to your endpoint URL. Verification requests include the following query string parameters, appended to the end of your endpoint URL. They will look something like this:
GET https://www.your-clever-domain-name.com/webhooks? hub.mode=subscribe& hub.challenge=1158201444& hub.verify_token=meatyhamhock
| Parameter | Sample Value | Description |
|---|---|---|
|
| This value will always be set to |
|
| An |
|
| A string that that we grab from the Verification token field when configuring Webhooks in Admin Center. |
Note: PHP converts periods (.) to underscores (_) in parameter names.
Whenever your endpoint receives a verification request, it must:
hub.verify_token value matches the string you set in the Verification token field when you configure the Webhooks in Admin Center (you haven't set up this token string yet).hub.challenge value. Follow these steps to enable webhooks in Admin Center.
Create an integration as you would normally, providing a name and description
From the settings page of your security integration click on the API access tab.
Now that you have successfully completed this guide, you will begin to receive Security Audit Logs at your configured end point whenever one is generated.