I have made a controller that sends a message to a list specified in an incoming message. When I'm finished sending out all the messages, I want to return a TwiML response.
However, if the list is too big it looks like Twilio is timing out. If the list contains 10 numbers a response is returned, if it contains 40 numbers Twilio then shows me a 11200 error in the dashboard.
The outgoing message is always sent, its just the response that fails.
I have done something like this:
foreach (var receiver in receivers)
{
try
{
await MessageResource.CreateAsync(
from: new PhoneNumber(SomeGroupName),
to: new PhoneNumber(receiver.Mobile),
body: SomeOutgoingMessage);
}
catch (SomeException e)
{
//Errorhandling
}
}
response.Message("Message sent to all members")
return TwiML(response);
Do anyone know why this is happening? Is there any other way to do this?