Cannot verify Line bot Webhook - heroku

I tried to make LINE bot based on this site:
https://www.casleyconsulting.co.jp/blog/engineer/3028/
I got an error when I push verify button.
The webhook returned an HTTP status code other than 200.(503 Service Unavailable)
Confirm that your bot server returns status code 200 in response to the HTTP POST request sent from the LINE Platform. For more information, see Response in the Messaging API Reference.
I αm not sure how to fix this problem.

First of all, what link did you put on the Line Developers website? You might have forgotten the /callback at the end...
Else, have you tried to send a message without verifying?
And the last question: did you write that command?
heroku git:remote -a {HEROKU_APP_NAME}
If you didn't try it before your git add . command.

Related

ngrok with DialogFlow for webhook debugging won't work

Last year, I was able to use ngrok to debug a webhook on api.ai (now called DialogFlow) by rerouting a public URL to a port on localhost.
Now, it simply won't work. I get the message "Error: Failed to parse webhook JSON response: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $."
The ngrok session shows "301 Moved Permanently" when DialogFlow executes the webhook, but the app is never reached.
Dialogflow treats responses besides a "200 ok" as a possible error. Using ngrok still works, but you should point directly to the URL of the webhook rather than the URL of something that will redirect to the webhook.

Trying to get direct line to point ngrok failing

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.

Webhook doesn't received any message

I'm following your guide posted here to create a custom bot. I use ngrok to expose my webhook running on localhost to the Internet. It's OK to access the webhook by browser or curl. But when bot is mentioned (#botname), the webhook doesn't got any messages. What could be wrong?
This appears to have been a transient problem - it works now for both OP and myself.

Shopify webhook verification in parse

I am trying to get a shopify webhook to fill my customer class in parse.com, however something must go wrong. I don't know how to verify the parse response since Shopify sends this webhook out from it's ruby backend. I used requestbin to catch the webhook and I replicated a post request using postman to my parse url and everything works fine. Does anyone know how to debug requests like these? Is there a console in Parse where I can see all the incoming requests and the responses Parse.com sent back?
Try using Runscope for debugging webhooks. Full guide here: https://www.runscope.com/provider-guide/troubleshooting-webhooks - this is more than just a request bin. It's a full transparent proxy that will, like a bin, record the webhook notification, but will also pass it along to the intended destination (your webhook receiver) and record that response as well.

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