After selecting the Whatapp product on my facebook developer dashboard, I try to add a webhook but it fails to verify the call back url and get I an error message that says The callback URL or verify token couldn't be validated. Please verify the provided information or try again later.
The call back url is set up just fine on my server though and this is what the code looks like
if (ctx.req?.query['hub.verify_token'] === 'my-verify-token') {
return ctx.req?.query['hub.challenge']
}
It is a GET endpoint.
Also, when I check the logs of my app, I realized that the endpoint is not even being hit.
Please how do I fix this?
I expected that the webhook will be added once I provided the details
2
Answers
Got the same problem here. I was able to get facebook requests by:
Had the same problem. Still not quite clear on why it was happening–I also hosted my Whatsapp product on Glitch with no issue for the callback. The issue seems to be related to DigitalOcean: I had to change the domain to another one that I owned. Once I changed the URL and hit the endpoint again through the Whatsapp callback URL, it was able to reach the server.
You can add a domain by going to the app settings in DigitalOcean.