Sdílet prostřednictvím


Twilio

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

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Automate Standard All Power Automate regions except the following:
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Power Apps Standard All Power Apps regions except the following:
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Contact
Name Microsoft
URL Microsoft LogicApps Support
Microsoft Power Automate Support
Microsoft Power Apps Support
Connector Metadata
Publisher Microsoft
Website https://www.twilio.com/
Privacy policy https://www.twilio.com/legal/privacy

Requirements

The Twilio connector requires the following information:

  • Your Twilio account ID and authentication token, which you can find on your Twilio dashboard, to authorize creating a connection from your app. If you're using a Twilio trial account, you can send text messages only to verified phone numbers.

  • One verified Twilio phone number that can send text messages and another phone number that can receive text messages.

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Shareable

Default

Applicable: All regions

Parameters for creating connection.

This is shareable connection. If the power app is shared with another user, connection is shared as well. For more information, please see the Connectors overview for canvas apps - Power Apps | Microsoft Docs

Name Type Description Required
Twilio Account Id securestring Twilio Account Id True
Twilio Access Token securestring Twilio Access Token True

Throttling Limits

Name Calls Renewal Period
API calls per connection 1200 60 seconds

Actions

Get Message

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

List Messages [DEPRECATED]

Returns a list of messages associated with your account.

List Messages V2

Returns a list of messages associated with your account. This action supports pagination.

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

Name Key Required Type Description
Message SID
MessageId True string

Unique SID of the message.

Returns

Proprties of a single message.

Message
Message

List Messages [DEPRECATED]

Returns a list of messages associated with your account.

Parameters

Name Key Required Type Description
To Phone Number
To string

Only show messages to this phone number.

From Phone Number
From string

Only show messages from this phone number.

Date Sent
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
Page integer

Page number. Default is 0.

Returns

List of one or more messages.

Message List
MessageList

List Messages V2

Returns a list of messages associated with your account. This action supports pagination.

Parameters

Name Key Required Type Description
To Phone Number
To string

Only show messages to this phone number.

From Phone Number
From string

Only show messages from this phone number.

Date Sent
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.

Returns

List of one or more messages.

Message List V2
MessageListV2

Send Text Message (SMS)

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

Parameters

Name Key Required Type Description
From Phone Number
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).

Text
body True string

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

Media Urls
media_url array of uri

List of URIs of media to be sent.

Status Call back
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
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
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.

Name Path Type Description
Text
body string

Body of the message.

From Number
from phone

Phone number from which the message was sent.

To Number
to phone

Phone number to which the message was sent.

Status
status string

Sent status of the message.

SID
sid string

SID of the sent message.

Account Sid
account_sid string

SID of the account associated with the sent message.

API
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.

Media Count
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)

Sent Date-Time
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
direction string

Direction associated with the sent message.

Error Codes
error_code integer

Error codes associated with the sent message, if any.

Error Messages
error_message string

Error messages associated with the sent message, if any.

Price
price string

Cost of the sent message.

Unit
price_unit string

Price unit used to evaluate the cost of the message.

URI
uri uri

Relative URI for this resource.

Subresource URIs
subresource_uris object

Relative URIs for any subresources.

Messaging Service Sid
messaging_service_sid string

Unique id of the messaging Service.

MessageList

List of one or more messages.

Name Path Type Description
messages
messages array of Message
Page
page integer

Page number of the respone.

Limit
page_size integer

Page size of the response.

Page Count
num_pages integer

Total number of pages in the response.

Start
start integer

Index of the first message.

End
end integer

Index of the last message.

URI
uri uri

Relative URI for this list.

First Page URI
first_page_uri uri

Relative URI for the first page.

Next Page URI
next_page_uri uri

Relative URI for the next page.

Message Count
total integer

Total number of messages.

Previous Page URI
previous_page_uri uri

Relative URI for the previous page.

MessageListV2

List of one or more messages.

Name Path Type Description
@odata.nextLink
@odata.nextLink string

Relative URI for the next page.

value
value array of Message

List of one or more messages.