3

I am trying to build a chatbot for facebook workplace but I have got stuck while creating the webhook for the chatbot.

After entering the Callback URL and verify_token, its showing me the error as: Problem Setting Up Webhook Subscription We could not verify the webhook callback. Make sure your webserver is listening and reachable through the specified callback url.

The Callback URL is HTTPS secured one. Following is the code I have placed in the php file:

$verify_token = "token";
$hub_verify_token = null;

if(isset($_REQUEST['hub_challenge'])) {
    $challenge = $_REQUEST['hub_challenge'];
    $hub_verify_token = $_REQUEST['hub_verify_token'];
}

if ($hub_verify_token === $verify_token) {
    echo $challenge;
} 

The callback URL is getting called from the browser as well.

  • 1
    _“The callback URL is getting called from the browser as well.”_ - that doesn’t say anything about whether Facebook can reach it or not. Is your SSL certificate valid? It won’t work with self-signed ones, or if your server provides an incomplete certificate chain. What does https://developers.facebook.com/tools/debug/, can it at least connect to the URL? – CBroe Mar 19 '18 at 07:18
  • Thanks @CBroe. Its showing SSL error. – Saili Jaguste Mar 19 '18 at 09:13
  • 1
    Did you actually solve this? I'm trying to locally develop with this using ngrok and I'm getting the same error... – empz Feb 26 '19 at 20:58
  • I too am using ngrok to expose my localhost, but it is giving this error – shanti Jul 07 '20 at 05:44

0 Answers0