Twilio Outbound message error. Unable to send sms from mobile to Twilio number #twilio

20 views Asked by At

I used this code as server.js

const express = require('express');
const { MessagingResponse } = require('twilio').twiml;

const app = express();

app.post('/sms', (req, res) => {
  const twiml = new MessagingResponse();

  twiml.message('It\'s Working');
  res.type('text/xml').send(twiml.toString());
});

app.get('/',(req,res)=>{
  res.send('Hii');
})

app.listen(1337, () => {
  console.log('Express server listening on port 1337');
});

I ran my server and also published my localhost using ngrok and got a public url which can be assesed from any where. This is how i configured in twilio account, I'm using a free trial account and even i tried replying to the twilio number that i used to send message but it's not woking. I tested my ngrok forwarded url in the web it's working fine even in postman i checked for the post request it's working good. I think it's the problem with twilio server, I even tried dev-phone but replying to message is not even working. #twilio solve this error.

I was expecting to recieve message to twilio phone number, i.e outbound messages

0

There are 0 answers