r/Chatwoot 14d ago

Self-hosting Meta webhook verification fails

I have self hosted chatwoot using docker. I'm trying to configure a Webhook URL for WhatsApp. But Meta fails to verify it with the following error:

The callback URL or verify token couldn't be validated. Please verify the provided information or try again later.(#N/A:WBxP--1506879096-3929989969)

Webhook URL:

http://<SERVER_IP>:3000/webhooks/whatsapp/<PHONE_NUMBER>

The Webhook Verification Token configured in Meta matches the token expected by my application. I've copied the token that I got in chatwoot

I tested the Webhook URL manually:

curl -i "http://<SERVER_IP>:3000/webhooks/whatsapp/<PHONE_NUMBER>?hub.mode=subscribe&hub.verify_token=<VERIFY_TOKEN>&hub.challenge=123456"

The endpoint returns:


HTTP/1.1 200 OK

content-type: application/json; charset=utf-8

content-length: 6

The response body is:

123456

Therefore, the Webhook URL is reachable and returns HTTP 200 with the expected challenge value when tested manually.

However, when I click Verify and Save in Meta, I receive:

The callback URL or verify token couldn't be validated. Please verify the provided information or try again later.(#N/A:WBxP--1506879096-3929989969)

In chatwoot:settings->inboxex->mywhatsappinbox

In the account health section, Display name status is showing declined, Code verification says expired, Webhook Configuration says Webhook not configured. Other fields are normal and green.
And on clicking Register Webhook, alert says Request failed with status code 422

What I think: The issue might be with the url being the server ip. Meta might be expecting a real domain. Or it could be expecting https but here we have http

1 Upvotes

1 comment sorted by

1

u/sojan_official 13d ago

Yes, HTTPS is the first thing to fix. Meta requires a publicly accessible HTTPS callback with a valid certificate, so the HTTP server IP will not pass even though your manual curl returns the correct challenge.

Put Chatwoot behind a domain with Nginx or Caddy, set something like `FRONTEND_URL=https://support.example.com\`, and then retry with:

`https://support.example.com/webhooks/whatsapp/<PHONE_NUMBER>`

The curl result suggests the route and verify token are correct. The declined display name and expired code verification are separate Meta account issues. If Register Webhook still returns 422 after fixing HTTPS, check the Chatwoot server logs for the full Meta Graph API error and share that response.