-1

I am building an app using ASP.Net core 3.1. Twilio voice call was successful. Now I have trouble capturing statuscallback. My logs & twilo logs show that twilio posted the statuscallback to https://myapp.com/call/events with error 15003 meaning HTTP 400.

This my code

[HttpPost]
public HttpResponseMessage Events([FromForm] StatusRequest statusRequest)
{
_logger.LogWarning($"Twilio status call back...");
}

What am I doing wrong here? It's not hitting the log in the action method.

2 Answers2

0

From the error message description:

https://www.twilio.com/docs/api/errors/15003.

Possible Solutions

Ensure your application responds to callbacks with:

  • 200 OK
  • Content-Type: text/xml
  • Valid TwiML
Alan
  • 10,465
  • 2
  • 8
  • 9
0

It was 'Antiforgery token validation failed.' exception causing the issue.