Twilio Number SMS forward to Node - node.js

I have a trial Twilio Acct and I have registered my number. I am able to send an SMS to myself using Node/Twilio API (Thanks!). I also have a listener in node for the return incoming webhook 'incomingSMSMessage':
app.on('incomingSMSMessage', function(sms) {
//_________________________Stuff here
});
So, from my Twilio Registered Number in my Trail Acct how do I get the SMS (actual message) sent from Twilio Number to my Node server? I realize I can use TwiML XML to respond w a hardcoded message, but I would like the actual SMS sent from my Twilio Registered Phone. If I must use the TwiML XML how do I populate dynamically with the SMS sent? I do not care about the message sent to the Twilio Phone- just the reply from the Twilio Phone SMS.

Twilio evangelist here.
You need to configure the Messaging Request URL of your Twilio number with a URL that points to your node server. To do this log into your Twilio dashboard, click the Numbers menu option, then click the number you want to configure. On the number configuration page, drop in a public URL in the Messaging Request URL field and save:
When Twilio receives an SMS message we will make an HTTP request to that URL, passing a bunch of parameters that you can use in your app.
Hope that helps.

Related

Not Receiving SMS in Twilio

I need to fetch SMS Response sent from Twilio using web hook using Twilio trial account credentials. In that, generated number is from US. And sms is sending from India number. And when message is sent back to Twilio that is not shows in incoming messages and not call the webhook url also.
I created app in twiml. And set webhook url in that also. But doesn't work.
For web hook I am using ngrok so in my local server so I can get data.
Any one have idea what is wrong I am doing.
EDITED
I have created testing twilio account. Generated number and the generated number is from US. I have set up webhook url in manage numbers.
URL is generated from ngrok so It can be used outside my network.
I have setup Twiml App also. And webhook url is also set there.
I am sending one programmable message from my node api. And that was working fine. User is getting programmable message but when user reply to that message it should call my webhook url. But it not calling my webhook url and also it not showing in my incoming message.
Thanks for any help.
For those who are struggling with this,
As of now Twilio not supports 2-way messaging in India.
Please refer this for more details.
Twilio Guidelines for India

Get SMS responses into a SharePoint list

I have been been able to use Twilio and SharePoint to send SMS messages. We would like to go to the next stage and create a question/response system and receive those SMS messages from our customers and add them to a SharePoint list, therefore kicking off workflows based on the customer's SMS response.
Any ideas ?
Inbound SMS are sent to your Twilio number which you can then define a webhook for. The webhook (the URL Twilio will sent an HTTP Request to when a message is received) will contain the Body of the SMS message.
TwiML™ for Programmable SMS
What is a Webhook

Unable to send sms to email and phone using twilio and python,django restframework

I have registered with twilio and my phone number is also activated,I have used this twilio service in django restframework and trying to send SMS to phone and email, but that time getting error. Any solution
twilio.base.exceptions.TwilioRestException:
HTTP Error Your request was:
POST /Accounts/ACd554de003ceb5ec51587cf5b06219b5e/Messages.json
Twilio returned the following information:
Unable to create record:
The number is unverified. Trial accounts cannot send messages to unverified numbers; verify at twilio.com/user/account/phone-numbers/verified, or purchase a Twilio number to send messages to unverified numbers.
More information may be available here:
https://www.twilio.com/docs/errors/21608
Twilio developer evangelist here.
While you are using a trial account you are only able to send SMS messages to numbers that you have verified with your Twilio account. You can verify a number by following these steps:
Login to your account at https://www.twilio.com/console.
Click Phone Numbers.
Click Verified Caller IDs.
Click the red + sign icon.
Enter the desired phone number to verify, and then click Call Me.
NOTE: Click Text you instead to receive a text message for verification.
Once you have verified your number you should be able to send an SMS from a Twilio number that you bought in the console to your number using the API.
You also said you were "trying to send SMS to phone and email". You cannot send an SMS to an email address using the Messages resource. If you want to send emails, I would look into the SendGrid API.

Twilio API for WhatsApp

I'm testing the Twilio API for WhatsApp, responding to incoming messages with TwiML.
In the request I can retrieve the sender's phone number, but is it also possible to retrieve the sender Whatsapp nick name?
It is also possible activate the typing indicators?
Twilio developer evangelist here.
The inbound Twilio webhook for WhatsApp does not support the sender nickname and you can't set or receive typing indicators at the moment.

In Twilio, what is the difference between Twilio number and logged in agent number?

In Twilio, what is the difference between Twilio number (For Customer Number) and logged in agent number?
Is every agent have unique Twilio number to receive an incoming call?
I assume agent number you are referring to is a Twilio Client name.
Twilio Number is the number you bought from Twilio which can be used in the following cases .
1.You can configure any call to this number. i.e., If the number receives any call, you can redirect to another number or say a common message or configure a ivr menu etc.,
2.To initiate a outbound call from Twilio, you can set this number as the caller id.
Twilio Client on the other hand, is used to connect our web application client(Browser) side to Twilio and vice-versa.
The Client name is created while generating Capability token which is used for setting Twilio Device in our client side.Then ,the browser tab is identified as the Client name by the Twilio. (used while dialling your browser tab)
You can set a same client name for limited number of Twilio Devices.
For detailed information on Twilio Client, visit this site.

Resources