Search code examples
whatsapp

Why I can't configure whatsapp's webhook in Whatsapp cloud API


Anyone know why I keep getting this:

"The callback URL or verify token couldn't be validated. Please verify the provided information or try again later."

Things I checked:

  1. App URL is well formed
  2. App response is 200 and challenge
  3. App has a valid TLS certificate

I don't know how to troubleshoot the error


Solution

  • It took me an aweful amount of time to figure out this, so that's why I'm putting this in internet for future folks like me.

    If you keep getting: "The callback URL or verify token couldn't be validated. Please verify the provided information or try again later."

    and there is no much information to troubleshoot this, you can go to:

    enter image description here

    enter image description here

    Hit subscribe to this object, try your URL that is not working, and on failure it would show a tiny red asterisc that contains more information about why that URL isn't good enough for verification when hover with the cursor. I don't know why meta developers didn't put that description in the whatsapp webhook configuration but it is what it is.

    In my case, as I didn't created the GET endpoints using express (JS) but .net (C#) I had to parse the challenge to int before returning it, hope it helps!