Trying to get direct line to point ngrok failing - botframework

I have run my bot locally (success)
I have set ngrok (success)
I have tested the remote url (success)
I have added Direct Line webchat to my local running site (success)
I have set up Direct Line and used this secret in my webchat (success)
However, I still get the old bot response (hosted on Azure)
So I have gone to the bot framework website --> my bot --> settings --> Messaging endpoint and set the URL as my ngrok address
It seems to be saved, but I get a strange popup saying
CorrelationID : SHUjnuhs=
Or some other random shortcode.
Seems to be an error from API/botmanager and response to an error 500
Just wondered if there is something else I am missing here in order to get direct line speaking to my locally running bot

Usually, that error means that the messaging endpoint has a space at the beginning and so it's not being saved (that's why you are seeing the old message). Reload the page, and before saving make sure there is no space at the begiining of the url.

Related

What is the request that whatsapp cloud api does to verify a webhook?

I'm able to verify the webhook using glitch from the getting started:
https://glitch.com/edit/?fbclid=IwAR2YTjZuGGM9Hi6T_v1eZh_nV6_HY3RYn_8lll4gY1REa_bJy6ZAuq6tkKQ#!/whatsapp-cloud-api-echo-bot
my local server (in a subdomain with https enabled) has the same behavior as glitch and show "WEBHOOK_VERIFIED" on the log for the request:
/webhook?hub.mode=subscribe&hub.verify_token=xpto123&hub.challenge=123
but when try to verify my local server the request from meta does not reach the server.
chrome showing that the connection to the server is secured
After more tests I found that my local server was been blocked by the ISP, understood it after test with another connection.
I made my own server and had tried ngrok and other programs to run it from local host with https redirect but whatsapp doesn't allow the use of those programs.
In the end, my error was that the URL HAS to end in /webhook or else, it won't even send the request. Then it'll send a GET request and you have to return the hub.challenge query param after making sure that the provided token from them is the one you set up. This is my code using NodeJS
if(req.query['hub.verify_token'] === process.env.VERIFY_TOKEN) return res.status(200).send(req.query['hub.challenge'])

Google Web Client with Oauth2 suddenly stops working

I'm creating a Social Platform using Google Login. The App works fine until next day that stop recieving the callback URI correctly when I try again to login with google.
Everytime I get the error I create a new Web Client and works just fine until the next day that I get a 401 Error, then change the URI callback to localhost instead of 127.0.0.1. It starts working just fine until the next day that I get the 400 Error.
Any idea what is causing this change that the system stops working after 1 day? It start asking for 127.0.0.1 but even if I put that it gets the same error.
The redirect URI in Google deveoper console needs to exactly match the one your code is sending from.
you are sending from http://127.0.0.1:8000/accounts/google/login/callback/ and its not in your list of approved redirect uris.
Remember the full path needs to match with the port.

Ngrok returns 405 error while tunneling my localhost

I have a web app bot that I would like to remote it so a few people can test it. I am using Bot Framework Emulator to test it locally and it works wonders, but I'm thoroughly failing to make ngrok host it.
(I actually managed doing it using the ...azurewebsites.net/api/messages link my app has in Azure with another bot, but I couldn't with this one, so I'm trying with the link ngrok offers me - both bots, the one I managed and this one, are hosted in Azure, but I don't know how to make it available to remote access)
Steps I'm taking:
Deploy the app in Visual Studio so it runs on localhost:3979;
Open port externally in ngrok using ngrok
3979 http -host-header=rewrite localhost:3979;
Get one of the forwarding URLs ngrok provides me, like
https://3d609207.ngrok.io
Insert previous URL in Bot Framework Emulator;
Click Connect.
Both in ngrok and in Bot Framework Emulator returns me 405 Method Not Allowed.
I tried accessing the link I inserted in Bot Framework Emulator and I normally have the page I would see while hosting my bot locally:
Describe your bot here and your terms of use etc.
Visit Bot Framework to register your bot. When you register it,
remember to set your bot's endpoint to
https://your_bots_hostname/api/messages
But I can't send nor receive messages in Bot Framework Emulator.
Additionally, ngrok prints this under the HTTP request headline:
HTTP Requests
-------------
POST / 405 Method Not Allowed
GET /favicon.ico 200 OK
GET / 200 OK
My MSAppID and Password are configured properly in web.config, and compilation results in no error, so I doubt it's something on the code (unless there is some configuration in the code that prevents this bot being accessed remotely for a reason, but I have no idea).
I would very much appreciate any help on this issue. Thanks for your time.
Both in ngrok and in Bot Framework Emulator returns me 405 Method Not Allowed
I can reproduce the issue on my side if I just provide https://xxxxxxxx.ngrok.io as message endpoint.
Please try to specify https://xxxxxxxx.ngrok.io/api/messages as message endpoint, which works for me.

Google location auto complete is not working on aws server

I am using google location autocomplete at aws server its not working and the same code i am using on another server its working fine you can check here AWS==> http://52.91.226.167/testgeo.php other server==>http://142.4.10.93/~vooap/alcohol/test.php geocomplete needs any server side setting ?
You should use a valid API key as mentionned in the message received when the autocomplete message is sent:
You can see this message under Network panel in developer console. Each time you hit a key in the input, an ajax request is sent and you receive this message.

Google checkout callback can't seem to reach https server

I am trying to implement Google Check out (GCO) on a new server, the process seemed to work fine on the old server.
The error from GCO integration console is the timeout error you might expect if there is load on the server and/or the response takes longer than 3 seconds to respond.
To perform a test (not integrating with my database), I have set some code to send an email to me instead. If I hit the https url manually, I get the email and I can see an output to the screen. If I then leave it as that, Google still returns the Timeout error and I don't get an email. So I have doubts as to whether google is even able to hit the https url.
I did temporarily attempt to use the unsecure url for testing and indeed I received the email, however this solution isn't the route we've developed for, so the problem is something to do with the secure url specifically.
I have looked into the certificate which is a UTN-USERFirst-Hardware which is listed as accepted on http://checkout.google.com/support/sell/bin/answer.py?answer=57856 . I have also tried to temporarily disable the firewall with no joy. Does anyone have any sugestions?
Good to hear you figured out the problem.
I'm adding the links below to add a litle more context for future readers about how Google Checkout uses HTTP Basic Authentication:
http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API.html#urls_for_posting
http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API.html#https_auth_scheme
http://code.google.com/apis/checkout/developer/Google_Checkout_HTML_API_Notification_API.html#Receiving_and_Processing_Notifications

Resources