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.