You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Load verify middleware just for post route on our receive webhook, and catch any errors it might throw to prevent the request from being parsed further.
Copy file name to clipboardexpand all lines: readme-facebook.md
+9
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,15 @@ Since Facebook delivers messages via web hook, your application must be availabl
54
54
55
55
When you are ready to go live, consider [LetsEncrypt.org](http://letsencrypt.org), a _free_ SSL Certificate Signing Authority which can be used to secure your website very quickly. It is fabulous and we love it.
56
56
57
+
## Validate Requests - Secure your webhook!
58
+
Facebook sends an X-HUB signature header with requests to your webhook. You can verify the requests are coming from Facebook by enabling `validate_requests: true` when creating your bot controller. This checks the sha1 signature of the incoming payload against your Facebook App Secret (which is seperate from your webhook's verify_token), preventing unauthorized access to your webhook. You must also pass your `app_secret` into your environment variables when running your bot.
59
+
60
+
The Facebook App secret is available on the Overview page of your Facebook App's admin page. Click show to reveal it.
0 commit comments