Trying to make call from my app to a number using Twilio API's
When call is received, getting application error
and here is the debugger logs for that call:
Error - 11200 HTTP retrieval failure 502 Bad Gateway errors
Passing a URL when POST Request.
Can anybody help me through this?
have you taken a look at this information from Twilio? They give possible causes and possible solutions for the error you received. Did you specify the correct content-type header in your response?
If you could share your code, that would be great!
Hope this helps!
Related
We're using Twilio. We have webhooks set up so that when Twilio receives a call, it forwards it to a URL on our site.
This appears to have been working fine. But now I made a change to the code, and suddenly Twilio is having problems calling the webhook. We don't receive the message, and if I look in the Twilio log, it says it got a 403 error. (I can't swear that this has never happened before. I've never noticed a message to be lost, but maybe I missed it while debugging other errors, attributed a lost message to something else.)
The truly strange part is, about 2/3 of the message that come in are received and processed fine, but about 1/3 get the 403 error. This is on a test server where we don't have any load balancing, so all requests are going to the same instance of our app. The tests I've been doing today are all from the same cell phone to the same Twilio number.
We do have authorization on the app, but the authorization is all on sub-directories, not the top level, and the sub-directory with our web hook has no authorization set up.
The first thing my our web hook now does when it gets called is send me an email with the content of the message from Twilio. (For debugging purposes.) I'm not getting that email, so I'm very confidant it's not getting called. And as I say, I can look at Twilio's log and it says that it received the text message and got a 403 error trying to forward it to my webhook.
The fact that it's only like 1/3 of the time is particularly puzzling. It's from the same number, to the same number, hitting exactly the same URL on the same site. Why would it work sometimes and not other times?
I tried to reproduce the problem on my desktop by calling the URL directly, not going through Twilio, and that does not give the same error. (It occurs to me as I type that the next logical test is to hit the page on the server without going through Twilio.)
Oh, the server is ASP.NET. The code is in VB but I doubt that matters as we're not getting as far as executing any of our code when it fails. When it doesn't get the 403, the code is working fine.
Check your firewall configuration as it might block the requests.
If it does then whitelist requests originating from Twilio.
We're using AWS WAF and ran into a similar situation: We saw the requests erroring out with a 403 in the Twilio Debugger but the requests never hit our endpoints. Once we adjusted the whitelist the problem was gone.
I have been having some success sending sms messages with Twilio via curl. Now I am wanting to implement the callback url to track the status of the message.. I cannot seem to get the call back to work
I have tried encoding it in JSON and also appending it as parameter and I havent been able to have any success.. Any help is appreciated
It's not JSON, it is sent as urlencoded (application/x-www-form-urlencoded).
Where do I find the specifications for inbound HTTP requests to my server?
I've got a bot up and running, most of the time it is working ok, but Twilio throws some 500 and 502 errors on every inbound SMS.
An attempt to retrieve content from https://sms.botframework.com/api/sms returned the HTTP status code 500.
or
An attempt to retrieve content from https://sms.botframework.com/api/sms returned the HTTP status code 502.
The 502 requests continue fine and responses are sent, but the 500s do not - the user doesn't get a response.
How can i get logging from the sms.botframework.com service to see what's going on? No errors are showing on the azure side for my bot.
Thank you
Right now the Bot Framework isn't set up for you to be able to get to the logs inside our SMS connector; the 502's are benign, but the 500's aren't something I normally see. If you wish, you can contact me with your botid at bf-reports#microsoft.com and I'll take a look, or DM me on twitter (#jameslew).
#Philnash happy to fill you in more on the BotFramework and how developers can use it with Twilio; just let us know how to contact you.
I am having an intermittent issue with Twilio. Once out of every 50 or 75 calls, we get a call that fails, and when I check the logs, it states that it is error 11200, and it gives a Bad Gateway 502 message "An upstream server received an invalid response".
I've taken a look at Twilio's suggestions regarding this error (found at https://www.twilio.com/docs/errors/11200). They list a bunch of probable causes for a bad gateway error:
1) Web server returned a 4xx or 5xx HTTP response to Twilio - as far as I can see in the logs, the web server is returning a 200 HTTP response to Twilio.
2) Misconfigured Web Server - We have checked the configuration of our web server, and believe it to be correct.
3) Network disruptions between Twilio and your web server - we have tested the ping response time, and the packet loss between www.twilio.com and our server. The ping time is < 100ms, and there seems to be no packet loss when testing with ping -n 100 www.twilio.com
4) No Content-Type header attached to response - we set our Content-Type to application/xml.
5) Content-Type doesn't match actual content - We set our Content-Type to application/xml and are using the TwiML language to send our responses back.
We have also checked all elements in Twilio's Possible Solutions section for this error.
A bit about what we are doing:
API Version: 2008-08-01
We only make outgoing calls.
We use TwiML to send a Say command, followed by a Gather. It is during the Gather that we get our intermittent error. The user will press a key, which gets sent back to us. Depending on which key is pressed, we then send another Say to Twilio - for example "You pressed 1. This offer has been accepted. Thank you." or "You pressed 2. This offer has been declined. Thank you."
I'm not ruling out that it's something at our end that is causing the issue, but we don't really know what to check next. The web server appears to be sending a 200 response back, but Twilio seems to be receiving a 502.
Does anybody have any suggestions that might help us out? Could it be a problem with the API we are using? Should we be upgrading to 2010-04-01?
Thank you in advance!
Hi i am trying to collect data from twitter search Api using Twitter4j. Every thing is working fine but after certain no. of calls to the Api it is throwing the following error.
403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
message - Missing or invalid url parameter
code - 195
Using thread.sleep i am calling Api every 1 min. so at the max it can have 60 calls. But the limit is 350 with authentication, then also i am getting this error.
Please help me out i am very new to this. Thanks in advance.
What are you sending in the DM. From now on it seems that if your message contains an URL the DM will be rejected:
https://support.twitter.com/articles/14606-posting-or-deleting-direct-messages