Search code examples
laravelwebhooksngrokwhatsapi

Whatsapp webhook won't connect with ngrok


I made a controller in laravel for WhatsApp webhook authentication, run it locally and use ngrok to connect it with WhatsApp webhook, it won't connect, it said "The Callback url or verify token could not be validated", but when I deploy it on heroku it working normally. Is there any special config so I can connect it locally using ngrok ? or is there any alternative solution?


Solution

  • You need to follow the steps provided in ngrok documentation, https://ngrok.com/docs/integrations/whatsapp/webhooks,

    I am not sure which step you are missing or have a problem with, but as per the error "The Callback url or verify token could not be validated", your deployed code for webhook is not valid as per the provided guideline in WhatsApp webhook docs.

    Make sure you have set the same verification code in the code and webhook verification when you configure!