Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the EOL process here.
If you're starting a new project, please visit the Conversations Docs to begin. If you've already built on Programmable Chat, please visit our Migration Guide to learn about how to switch.
This is reference documentation for the v1 REST API, which has been deprecated. You should use the current v2 REST API.
The Member resource of Programmable Chat represents the membership of a User within the Service instance to a Channel.
Each member has these properties:
The unique string that we created to identify the Member resource.
^MB[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Member resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The unique ID of the Channel for the member.
^CH[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Service the resource is associated with.
^IS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The application-defined string that uniquely identifies the resource's User within the Service. See access tokens for more info.
The date and time in GMT when the resource was created specified in RFC 2822 format.
The date and time in GMT when the resource was last updated specified in RFC 2822 format.
The SID of the Role assigned to the member.
^RL[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The ISO 8601 timestamp string that represents the date-time of the last Message read event for the Member within the Channel.
The absolute URL of the Member resource.
1GET /Services/{Instance SID}/Channels/{Channel SID}/Members2
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listMember() {11const members = await client.chat.v112.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.channels("CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")14.members.list({ limit: 20 });1516members.forEach((m) => console.log(m.sid));17}1819listMember();
1{2"meta": {3"page": 0,4"page_size": 50,5"first_page_url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=50&Page=0",6"previous_page_url": null,7"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members?PageSize=50&Page=0",8"next_page_url": null,9"key": "members"10},11"members": [12{13"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",14"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",15"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",16"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",17"identity": "jing",18"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",19"last_consumed_message_index": null,20"last_consumption_timestamp": null,21"date_created": "2016-03-24T21:05:50Z",22"date_updated": "2016-03-24T21:05:50Z",23"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"24}25]26}
1POST /Services/{Instance SID}/Channels/{Channel SID}/Members2
The SID of the Service to create the resource under.
^IS[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
application/x-www-form-urlencoded
The identity
value that uniquely identifies the new resource's User within the Service. See access tokens for more details.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createMember() {11const member = await client.chat.v112.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.channels("CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")14.members.create({ identity: "IDENTITY" });1516console.log(member.sid);17}1819createMember();
1{2"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"channel_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",5"service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",6"identity": "IDENTITY",7"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"last_consumed_message_index": null,9"last_consumption_timestamp": null,10"date_created": "2016-03-24T21:05:50Z",11"date_updated": "2016-03-24T21:05:50Z",12"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"13}
1GET /Services/{Instance SID}/Channels/{Channel SID}/Members/{Member SID}2
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchMember() {11const member = await client.chat.v112.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.channels("CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")14.members("MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")15.fetch();1617console.log(member.sid);18}1920fetchMember();
1{2"sid": "MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",3"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"channel_sid": "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",5"service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",6"identity": "jing",7"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"last_consumed_message_index": null,9"last_consumption_timestamp": null,10"date_created": "2016-03-24T21:05:50Z",11"date_updated": "2016-03-24T21:05:50Z",12"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"13}
1DELETE /Services/{Instance SID}/Channels/{Channel SID}/Members/{Member SID}2
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function deleteMember() {11await client.chat.v112.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.channels("CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")14.members("MBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")15.remove();16}1718deleteMember();