Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Setting up an api for receiving Twilio messages, I can hit it with Postman but Twilio does not hit it

$
0
0

I have a server side Blazor website with an API set up for Twilio. I have Twilio pointing to the correct endpoint, and when I call it in Postman it works. However when I send an SMS in the API is never hit, why is that?

using Twilio.AspNet.Common;namespace Webapp.Services.Controllers.API{    [Route("api/[controller]/[action]")]    [ApiController]    public class TwilioAPIController    {        [HttpPost]        [AllowAnonymous]        public void ReceiveSms(SmsRequest message)        {            Logger.Log("Received SMS message: " + Newtonsoft.Json.JsonConvert.SerializeObject(message));        }    }}

For reference, here is the Postman body that is working:

{"MessageSid": "","SmsSid": "","Body": "Hello","MessageStatus": "","OptOutType": "","MessagingServiceSid": "","NumMedia": 0,"ReferralNumMedia": 0,"accountSid": "removed","From": "+11234567890"}

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>