wit-ai / node-wit

Node.js SDK for Wit.ai
Other
2.05k stars 485 forks source link

messenger.js example does not work with ngrok because SSL certificate cannot be validate in facebook app webhooks #139

Open mahermalaeb opened 7 years ago

mahermalaeb commented 7 years ago

Hello,

While implementing the messenger.js test case I was not able to connect to my ngrok generated site from the webhooks setup in the facebook app page. The following error is generated

The URL couldn't be validated. Callback verification failed with the following errors: curl_errno = 51; curl_error = SSL: no alternative certificate subject name matches target host name 'www.b2e63813.ngrok.io'; HTTP Status Code = 200; HTTP Message = Connection established

Can you please update the example warning that ngrok is not working? Otherwise please let me know where I went wrong.

Regards, Maher

trieudh58 commented 7 years ago

Note that you should use https://.... generated by ngrok, not http://.....

Are you doing it right?

mahermalaeb commented 7 years ago

@trieudh58 Yes I have used https://.... Did you try it on your side and is it working with messenger?

I think I am doing right as explained by the example

bitpantry commented 6 years ago

@mahermalaeb did you figure this out? I'm getting the same error.

lyhourchhen commented 4 years ago

I resolved it by passing verify token from the console /webhook will accept the Verify Token {token} instead of the real verify token you created because of the script generate a new one.

chessai commented 3 years ago

@LyhourChhen mind creating a PR updating the documentation for this?