Domain Whitelisting
Some features like Messenger Extensions and Checkbox Plugin require a bot to specify a domain whitelist.
Setting Domain Whitelist
To specify a domain whitelist, send a POST request:
curl -X POST -H "Content-Type: application/json" -d '{
"whitelisted_domains":[
"https://petersfancyapparel.com"
]
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=PAGE_ACCESS_TOKEN" Fields
| Property Name | Description | Type | Required |
|---|---|---|---|
| A list of domains being used. All domains must be valid. Up to 10 domains allowed. | Array | Y |
Response
If your domain whitelist was set successfully, you will get back the following response:
{
"result":"success"
} Reading Domain Whitelist
To read the domain whitelist you set previously, send a GET request:
curl -X GET "https://graph.facebook.com/v2.6/me/messenger_profile?fields=whitelisted_domains&access_token=PAGE_ACCESS_TOKEN"
Deleting Domain Whitelist
To delete the domain whitelist you set previously, send a DELETE request:
curl -X DELETE -H "Content-Type: application/json" -d '{
"fields":[
"whitelisted_domains"
]
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=PAGE_ACCESS_TOKEN"