Twilio Imessage



  1. The Twilio bindings are provided in the Microsoft.Azure.WebJobs.Extensions.Twilio NuGet package, version 1.x. Source code for the package is in the azure-webjobs-sdk GitHub repository. The following table tells how to add support for this binding in each development environment.
  2. Twilio only sends SMS messages, not iMessages as Apple has not made that API public. Consequently you will notice that messages from Twilio numbers will appear as green chat bubbles and cannot have any of the fancy iMessage effects.
  3. At this point I could point to a lot of things to explain the lack of engagement: too much data needed for correlations, bugs in the user interface, shitty idea, wrong audience, etc. However, there was one thing in particular which bothered me more than anything, and that was that the texts sent from twilio were green (not iMessage).

We'll show you how to get your Arduino to send SMS with Twilio, so your Arduino can text whenever it's running late.

Messages show a time in Twilio's Outbound Queue that matches up with the delay experienced by the user. To see the time a specific message spent in Twilio's queue, browse to your Message Logs in Console, and then click on a message to view its details. Twilio only sends SMS messages, not iMessages as Apple has not made that API public. Consequently you will notice that messages from Twilio numbers will appear as green chat bubbles and cannot have any of the fancy iMessage effects.

This sketch uses our Twilio > SMSMessages > SendSMS Choreo.

Get Set Up

1Make sure you have a Temboo account. If you don't already have one, you can register for free.

2Next, make sure that you've got the latest version the Arduino IDE installed. You should also check that you have the newest version of the Temboo Library by checking the Arduino Library Manager

Twilio Imessage

3You'll also need a Twilio account, which you can create for free here.

4You'll need to supply your Twilio phone number, along with the Account SID and Auth Token you get when you register with Twilio. Make sure to use the Account SID and Auth Token from your Twilio Console Dashboard, shown below, as opposed to the test credentials from the Dev Tools panel.

A Twilio Account SID and Auth Token in the Twilio Console Dashboard

5When using a free Twilio account, you'll need to verify the phone number to which messages are being sent by going to Twilio and following the instructions under the 'Numbers > Verified Caller IDs' tab.

Auto-Generate the Sketch

6Go to the Twilio > SMSMessages > SendSMS Choreo in our Library.

7Select Arduino from the drop down menu at the top of the Choreo page, then choose your Arduino device. Make sure that you've added details about how your Arduino will connect to the internet.

Imessage

8Click Generate Code to test out the Choreo from our website and confirm that you can send an SMS to your own phone.

Testing the SendSMS Choreo from our website

9When you've confirmed that the Choreo runs successfully and you've received an SMS, you can copy the auto-generated Arduino code from the Code section and paste it into your Arduino IDE.

10The auto-generated sketch references the TembooAccount.h header file, which contains your Temboo account information and internet shield details. You'll find the code for this file beneath your generated sketch. Create a new tab in the Arduino IDE called TembooAccount.h and copy in the header file information.

Run The Sketch

11With both files in place you are ready to upload the sketch and start sending SMS from your Arduino. Text away!

Imessage

Note: If you run into problems with this example, it could be that Twilio doesn't yet support sending SMS from your country. Here's a full list of the countries they currently have SMS support for.

What's Next?

Now that you've mastered SMS, why not check out the rest of the 2000+ Choreos in our Library and start planning your next Arduino project.

Need Help?

We're always happy to help. Just email us at support@temboo.com, and we'll answer your questions.

-->

Twilio enables apps to send and receive global SMS, MMS and IP messages.

This connector is available in the following products and regions:

Twilio
ServiceClassRegions
Logic AppsStandardAll Logic Apps regions except the following:
- Azure China regions
Power AutomateStandardAll Power Automate regions except the following:
- US Government (GCC High)
- China Cloud operated by 21Vianet
Power AppsStandardAll Power Apps regions except the following:
- US Government (GCC High)
- China Cloud operated by 21Vianet
Contact
NameMicrosoft
URLMicrosoft LogicApps Support
Microsoft Power Automate Support
Microsoft Power Apps Support
Connector Metadata
PublisherMicrosoft
Websitehttps://www.twilio.com/
Privacy policyhttps://www.twilio.com/legal/privacy

Connector in-depth

For more information about the connector, see the in-dept section.

Creating a connection

Twilio Message

The connector supports the following authentication types:

DefaultRequired parameters for creating connection.All regionsNot shareable

Default

Applicable: All regions

Required parameters for creating connection.

This is not shareable connection. If the power app is shared with another user, another user will be prompted to create new connection explicitly.

NameTypeDescription
Twilio Account IdsecurestringTwilio Account Id
Twilio Access TokensecurestringTwilio Access Token

Throttling Limits

NameCallsRenewal Period
API calls per connection120060 seconds

Actions

Get Message

This operation returns a single message specified by the provided Message ID.

List Messages

Returns a list of messages associated with your account.

Send Text Message (SMS)

This operation is used to send a new message to a mobile number.

Get Message

This operation returns a single message specified by the provided Message ID.

Parameters

NameKeyRequiredTypeDescription
MessageId True string

Unique SID of the message.

Returns

Proprties of a single message.

Message
Message

List Messages

Returns a list of messages associated with your account.

Parameters

NameKeyRequiredTypeDescription
To string

Only show messages to this phone number.

From Phone Number
From string

Only show messages from this phone number.

DateSent date

Only show messages sent on this date (in GMT format), given as YYYY-MM-DD. Example: 2009-07-06.

Limit
PageSize integer

How many resources to return in each list page. Default is 50.

Page integer

Page number. Default is 0.

Twilio Imessage Setup

Returns

List of one or more messages.

Message List
MessageList

Send Text Message (SMS)

This operation is used to send a new message to a mobile number.

Parameters

NameKeyRequiredTypeDescription
from True string

A Twilio phone number (in E.164 format) or alphanumeric sender ID enabled for the type of message you wish to send.

To Phone Number
to True string

The destination phone number. Format with a '+' and country code e.g., +16175551212 (E.164 format).

body True string

The text of the message you want to send, limited to 1600 characters.

Media Url
Media Urls uri
StatusCallback uri

A URL that Twilio will POST to each time your message status changes.

Messaging Service Sid
messaging_service_sid string

Unique id of the Messaging Service.

application_sid string

SID of Twilio Application which is configured with the required Message status call back.

Max Price
max_price string

The total maximum price limit for the message.

validity_period string

The number of seconds that the message can remain in a Twilio queue.

Returns

Proprties of a single message.

Message
Message

Definitions

Message

Proprties of a single message.

Twilio Message Voices

NamePathTypeDescription
body string

Body of the message.

From Number
from phone

Phone number from which the message was sent.

to phone

Phone number to which the message was sent.

Status
status string

Sent status of the message.

sid string

SID of the sent message.

Account Sid
account_sid string

SID of the account associated with the sent message.

api_version string

Version of the API used to send the message.

Segment Count
num_segments string

Number of segments the message was divided into.

num_media string

Number of media files associated with the sent message.

Created Date-Time
date_created string

yyyy-MM-ddTHH:mm:ss.fffZ (UTC format)

date_sent string

yyyy-MM-ddTHH:mm:ss.fffZ (UTC format)

Updated Date-Time
date_updated string

yyyy-MM-ddTHH:mm:ss.fffZ (UTC format)

direction string

Direction associated with the sent message.

Error Codes
error_code integer

Error codes associated with the sent message, if any.

error_message string

Error messages associated with the sent message, if any.

Price
price string

Cost of the sent message.

price_unit string

Price unit used to evaluate the cost of the message.

URI
uri uri

Relative URI for this resource.

subresource_uris object

Relative URIs for any subresources.

Messaging Service Sid
messaging_service_sid string

Unique id of the messaging Service.

MessageList

Twilio Message Service

List of one or more messages.

NamePathTypeDescription
messages array of Message
Page
page integer

Page number of the respone.

page_size integer

Page size of the response.

Page Count
num_pages integer

Total number of pages in the response.

start integer

Index of the first message.

End
end integer

Index of the last message.

uri uri

Relative URI for this list.

First Page URI
first_page_uri uri

Relative URI for the first page.

next_page_uri uri

Relative URI for the next page.

Message Count
total integer

Total number of messages.

previous_page_uri uri

Relative URI for the previous page.