Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Messaging Service ChannelSender Resource


(warning)

Public Beta

The Service Resource is currently available as a Public Beta product. This means that some features for configuring your Messaging Service via the REST API are not yet implemented, and others may be changed before the product is declared Generally Available. Messaging Service Configuration through the Twilio Console(link takes you to an external page) is Generally Available.

Public Beta products are not covered by a Twilio SLA(link takes you to an external page).

The resources for sending Messages with a Messaging Service are Generally Available.

The ChannelSender subresource of a Service Resource represents a channel sender that is associated with a Messaging Service, such as WhatsApp. It allows you to view basic channel sender information.

See Twilio Channels: A New Way Reach Customers in Apps They Already Use(link takes you to an external page) for more information on Twilio Channels.


ChannelSender Properties

channelsender-properties page anchor
account_sidSID<AC>
Not PII

The SID of the Account(link takes you to an external page) that created the ChannelSender resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

messaging_service_sidSID<MG>

The SID of the Service(link takes you to an external page) the resource is associated with.

Pattern: ^MG[0-9a-fA-F]{32}$Min length: 34Max length: 34

sidSID<XE>

The unique string that we created to identify the ChannelSender resource.

Pattern: ^XE[0-9a-fA-F]{32}$Min length: 34Max length: 34

senderstring

The unique string that identifies the sender e.g whatsapp:+123456XXXX.


sender_typestring

A string value that identifies the sender type e.g WhatsApp, Messenger.


country_codestring

date_createdstring<date-time>

The date and time in GMT when the resource was created specified in ISO 8601(link takes you to an external page) format.


date_updatedstring<date-time>

The date and time in GMT when the resource was last updated specified in ISO 8601(link takes you to an external page) format.


urlstring<uri>

The absolute URL of the ChannelSender resource.


Fetch a ChannelSender resource

fetch-a-channelsender-resource page anchor
GET https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/ChannelSenders/{Sid}

Path parameters

path-parameters page anchor
MessagingServiceSidSID<MG>required

The SID of the Service(link takes you to an external page) to fetch the resource from.

Pattern: ^MG[0-9a-fA-F]{32}$Min length: 34Max length: 34

Sidstringrequired

The SID of the ChannelSender resource to fetch.

Fetch a ChannelSender

fetch-a-channelsender page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.channelSenders('XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.fetch()
_11
.then(channel_sender => console.log(channel_sender.messagingServiceSid));

Output

_11
{
_11
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_11
"messaging_service_sid": "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_11
"sid": "XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_11
"sender": "whatsapp:+12487960483",
_11
"sender_type": "WhatsApp",
_11
"country_code": "US",
_11
"date_created": "2023-07-30T20:12:31Z",
_11
"date_updated": "2023-07-30T20:12:33Z",
_11
"url": "https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelSenders/XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_11
}


Read multiple ChannelSender resources

read-multiple-channelsender-resources page anchor
GET https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/ChannelSenders

MessagingServiceSidSID<MG>required

The SID of the Service(link takes you to an external page) to read the resources from.

Pattern: ^MG[0-9a-fA-F]{32}$Min length: 34Max length: 34
PageSizeinteger

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

Pageinteger

The page index. This value is simply for client state.

Minimum: 0

PageTokenstring

The page token. This is provided by the API.

List multiple ChannelSenders

list-multiple-channelsenders page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.messaging.v1.services('MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.channelSenders
_11
.list({limit: 20})
_11
.then(channelSenders => channelSenders.forEach(c => console.log(c.sid)));

Output

_24
{
_24
"meta": {
_24
"page": 0,
_24
"page_size": 20,
_24
"first_page_url": "https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelSenders?PageSize=20&Page=0",
_24
"previous_page_url": "https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelSenders?PageSize=20&Page=0",
_24
"next_page_url": "https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelSenders?PageSize=20&Page=1",
_24
"key": "senders",
_24
"url": "https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelSenders?PageSize=20&Page=0"
_24
},
_24
"senders": [
_24
{
_24
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_24
"messaging_service_sid": "MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_24
"sid": "XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_24
"sender": "whatsapp:+12487960483",
_24
"sender_type": "WhatsApp",
_24
"country_code": "US",
_24
"date_created": "2023-07-30T20:12:31Z",
_24
"date_updated": "2023-07-30T20:12:33Z",
_24
"url": "https://messaging.twilio.com/v1/Services/MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelSenders/XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_24
}
_24
]
_24
}


Rate this page: