This isn't a question about why I got 11200 error. All I'm asking, is if twilio attempts the request again at a later time?
The documentation: https://www.twilio.com/docs/api/errors/11200 , doesn't mention anything about reattempting.
Twilio developer evangelist here.
Twilio doesn't retry any calls that fail. You would need to build it into your system so when you think something should have completed but it hasn't, you get it to trigger a Twilio request again.
Alternatively, if you have an unstable server, on your webhook, you can configure a fallback URL. You can also use that to let you know when Twilio tried to make a request and failed because your primary webhook was down.
Hope this help you
Related
I wonder if there is a way I can request a bot by the link like 'https://t.me/bot_name?start=XXX', and get the bot's answer? I've searched for it for a long time, but found no way.to solve it.
I've tried sending to the bot a '/start=XXX' message, but it returns a different answer from the manual operation.
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!
I have been trying to build a app that redirect a Twilio number to another phone number when a customer call Twilio number.
When callback URL does not return proper Twilml, it says "Application has failed" message on the call.
However, I do not want my customers hear that message even though there is a error.
Is there a way to turn that message off?
Thank you.
Twilio evangelist here.
There is no way to disable the error message, but you can set a Fallback URL on your phone number that Twilio will request in case the Voice Request URL fails.
You could set the Fallback URL to a simple static XML file hosted somewhere like Amazon or Dropbox, or use a service like twimlbin.com to host some backup TwiML for you.
I'm trying to integrate twilio into my rails app. I want to be able to tell if there are any error messages using a response returned from the 'get' method
Twilio's example has this
#notification = #client.account.notifications.get("NO5a7a84730f529f0a76b3e30c01315d1a")
that was on this page https://www.twilio.com/docs/api/rest/notification
Here is how I'm calling it in rails console
client = Twilio::REST::Client.new(ENV['twilio_account_sid'], ENV['twilio_auth_token'])
n = client.account.notifications.get("SMb6e3a5d4649e485ea9fa818ba84ec721")
n.message_text
And I get this error
Twilio::REST::RequestError: The requested resource /2010-04-01/Accounts/[my account]/Notifications/SMb6e3a5d4649e485ea9fa818ba84ec721.json was not found
That sid is a valid sid, and I confirmed it by looking in my logs.
So why can't I look up the message with this method?
Thanks
Twilio developer evangelist here.
I think the problem is that you are not looking up a notification in your example. The SID you are using is "SMb6e3a5d4649e485ea9fa818ba84ec721" which is for an SMS message (indicated by the "SM" at the front).
As you can see in the example from the docs, notification SIDs start with "NO".
You should be able to get hold of the message you are after using client.account.messages.get('SMb6e3a5d4649e485ea9fa818ba84ec721').
You can also find all the notifications to your account by calling client.account.notifications.list.
Hope this helps, let me know if you have any other questions.
Initially I have been using the TwiML response to send response to my text messages. But since my requirement has changed and I need to send more than 10 messages in response to my text hence I am now using the Twilio API to send the message out. So to fix this now I am trying to send nothing as the TwiML response for my Text Messages and instead using the Twilio API to send the actual messages out. I also have a TwiML bin URL attached to my short code as a Message Fall Back URL in case Twilio is not able to connect to my REST API URL. So now when a Text message is received by Twilio it connects to my REST API and the response is sent. But I am getting the response from the Message FallBack URL first and then the actual response for my text message via the Twilio API. Is there anyway to avoid this? I can remove the Message Fall back URL but then what would happen in the actual case when Twilio is not able to connect to my server?
This is how I have added the code:
var twilioResponse = new Twilio.TwiML.TwilioResponse();
...... have code that uses Twilio API to send out more than 10 messages.
...... Since the messages are going out via Twilio API hence returning NULL to the TwiML response
return Request.CreateResponse(HttpStatusCode.OK, twilioResponse.Element);
More Updates:
As I mentioned earlier I'm using the REST API to send an SMS. When a Text request comes Twilio server calls my URL supplied to the REST call.
Sometimes my server is little slow in responding - in which case twilio gets the fallback URL message and passes on the text message.
How do I increase the timeout ? This timeout is the time the server responding with TWIML.
Please help - any pointers are appreciated.
Twilio evangelist here.
My first suggestion would be to check your accounts App Monitor to see if Twilio is logging any errors. The Fallback URL should not be getting requested unless Twilio fails to get a valid response from the primary URL.
The default timeout for a Twilio request is 15 seconds, so if your server is taking longer than that to respond there may be a bigger issue happening with your server or network.
Hope that helps.