0

I am trying to setup a WhatsApp bot using voiceflow, based on the tutorial found here. I've set this up before and everything has worked fine, but now I can't seem to configure the webhook.

The steps I'm performing are as follows:

  1. Clone the repo here
  2. Checked ngrok is installed (version 3.0.7), and its location (/usr/local/bin/ngrok)
  3. Created a .env file at the root with the VERIFY_TOKEN, PORT, and WHATSAPP_TOKEN
  4. Started the app from root with npm start
  5. Started ngrok with ngrok http 8000 (the same port as specified in my .env)
  6. Checked the resulting address works in the browser

According to the documentation, I then configure the webhook by adding "/webhook" to the end of the URL, and adding the same VERIFY_TOKEN as specified in my .env file. This, however, gives me the following error:

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

I've had a look around at similar questions here, but could not find what was wrong. I have also spoken to others who encountered similar issues over the last few weeks. This process was working up until recently (Nov 2022).

cookie1986
  • 865
  • 12
  • 27

2 Answers2

0

The error msg: The callback URL or verify token couldn't be validated. Please verify the provided information or try again later. usually means you are not returning a 200 response to the webhook origin. I would make sure your code is returning a 200 to whatsapp.

As an alternative, try to set the webhook on glitch as explained here:

https://developers.facebook.com/docs/whatsapp/sample-app-endpoints#cloud-api-sample-app-endpoint

so that you can check if your meta account is valid.

lu4t
  • 304
  • 2
  • 5
0

From what I have found it seems that feature is now behind a paywall. It worked fine a few months ago on the free tier of ngrok. So you will need to upgrade your ngrok subscription for WhatsApp to start validating. You can read about it here. Try using Cloudflare tunnel.

Emmanuel
  • 413
  • 1
  • 6
  • 13