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:
Clone the repo here
Checked ngrok is installed (version 3.0.7), and its location (/usr/local/bin/ngrok)
Created a .env file at the root with the VERIFY_TOKEN, PORT, and WHATSAPP_TOKEN
Started the app from root with npm start
Started ngrok with ngrok http 8000 (the same port as specified in my .env)
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).
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.
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.
Related
Good morning everyone. I am developing an application that uses the watson assistant webhook by sending some parameters to a server, which analyzes the parameters and based on these sends a response to the application and to watson itself.
Well, it turns out that I was using ngrok to do this test by placing the parameters in watson, until a few days ago I couldn't (or it doesn't exactly let me) make the request.
Error
Cannot create property 'transactionId' on string ' Access Denied Access Denied You don't have permission to access "http://us-south.assistant.watson.cloud.ibm.com/rest/v2/skills/ on this server. Reference '
I have tried other applications that allow me to do the same work as ngrok, but I am new to this and it is very complicated. LOCALTUNNEL solved my problem temporarily, but later it didn't work anymore. I also tried with portmap.io, serveo, pagekite, smee.io among others and I still can't perform my requests.
I would really appreciate any help with my problem. Thank you very much.
I am trying to post a simple json to our backend api through REST POST snap. Everything was working. And then we changed the url to a new url and I updated the url in the snap.
But now request is simply not reaching our new api server.
In fact, the snaplogic pipeline also completes successfully, with all snaps turning green. Only when I click on the properties of pipeline, I get to know that REST POST snap has failed, with attached screenshot error.
Please note that we are able to reach the new api server via postman or any other rest client. Nothing has changed at all except for the url.
Can you please help me understand, what exactly is going wrong and where? How to debug this?
Just for everyone's reference, I was able to find out the root cause.
Reason was that the api url was not accessible to snaplogic pod running in our enterprise because of Zscaler firewall.
The confusing part here was the error message returned which says "SSL issue, connection was reset". So if you see issue saying "Connection was reset", assume that snaplogic is unable to access the url as the first problem. Only after making sure, it is not the case, go and look for what exactly the error says.
I'm trying to debug a bot locally on Bot Framework Emulator.
I've installed ngrok and I made it start with the emulator itself (using the settings provided by the framefork).
The bot starts correctly using npm start, so I've putted the URL on Bot Framework Emulator and I checked the debug mode.
As it starts the emulation stops here and looking at the ngrok traffic inspector I got this.
I've already tried to restart the framework, the bot itself and check if ngrok was already running (I couldn't find any clue about this), so any advice would be useful, thanks in advance!
I used to create a teams conversation bot in c#, and when I test it in local environment, I need to use ngrok to expose my service to the internet so that the bot service I created in azure portal can listen.
I used this command ngrok http -host-header=rewrite 3978, then I can get a 'https' url that is the same as localhost:3978 and set this url+'/api/messages' as 'Messaging endpoint'.
By the way, I need to set appId and app secret in appSetting.json with the value of my azure ad application created when creating 'bot channel registration'. I remembered that if I used error appId, ngrok will get 404 error.
=====================UPDATE=========================
As I really can't understand the error, pls compared your actions with mine and provide more details if needed.
I installed Bot Framework Emulator and test it locally. First I installed it, and I followed the tutorial to make the configuration. I used c# as I metioned above, so when my bot program running locally, it will show me the successful website with a url like 'http://localhost:3978/', so I open a bot in emulator like below, then click 'Connect', pls note here, I never did any other configurations such as set environment variable, all actions are included in the screenshot:
After these steps, I can reach it. By the way, if I didn't enter appid and secret, I will get an error 'Unauthorized', if I used wrong id and secret, an 'incorrect' error will appear.
You are using nodejs to compose a bot, so maybe the appId and secret can be found in .env?
I am following this guide to build NodejS bot using Gupshup whatsapp https://www.gupshup.io/developer/docs/bot-platform/guide/gupshup-bot-library-for-node
I am running the code and getting the ngrok URL:
But when following steps are given, I get an error as below:
Not sure what is wrong here. Please let me know how can I solve this issue?
Sometimes ngrok service can be not reachable (for any reason).
First - make sure you can open ngrok link in the browser or by curl and make sure it reaches your server api.
Also if your backend check incoming requests for specific app key in header, you should also add it to url params, due to you have no way to manage GupShup api caller.
for the first time setting callback you need to return a 200 status.
res.status(200).send('ok');
Use this as first line for first time for setting callback and after call back is set you can comment this out. And save and relauch your code (make sure address of your hosted code is same don't restart ngrok :P) is same
I have slackbox running locally, have created a Spotify dev application and have successfully authenticated slackbox. It says I am logged in at http://localhost:5000/. All of my variables have been set, including the slack token, in an .env file via dotenv.
All seems well there.
On the slack side, I have created a slash command mapped to /spotify that POSTs to http://localhost:5000/store. The slash command shows up in my command description list when typing.
When I attempt to use it though, I get an access denied message in chat, I'm assuming due to cross-domain issues:
ERROR: The requested URL could not be retrieved Access Denied.
According to their docs - https://github.com/benchmarkstudios/slackbox - running this locally should work. I also run a Hubot bot locally and it integrates fine with the same slack room.
Any help is appreciated!
https://sprint.ly/blog/5-steps-to-a-slack-integration/
Slack’s outgoing slash command requests need to be sent to a public facing url, which is a problem if we want to receive these messages to our local development server.
How do we solve this?
One way is with the use of a secure tunnel which acts as a public HTTPS URL for our local development server. Problem solved!
Who provides this service?
ForwardHQ provide the best user experience, including a browser extension for setting up a local tunnel in one click. They have a free 7 day trial.
My preferred option is ngrok. It’s free for one concurrent tunnel client, with no time restriction. Woop! Its a little harder to use but it does the job.