skip to Main Content

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


  1. Got the same problem here. I was able to get facebook requests by:

    1. Use a https default (443) port endpoint: you should not use http://www.example.com/endpoint or https://www.example.com:8443/endpoint.
    2. Add the endpoint domain to app Domain Manager (located in settings).
    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search