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 Invite resource of Programmable Chat represents all pending invitations to Users within the Service instance to become a Member of the Channel.
Each invite has these properties:
The unique string that we created to identify the Invite resource.
^IN[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the Invite resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Channel the resource belongs to.
^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 resource.
^RL[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The absolute URL of the Invite 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 listInvite() {11const invites = await client.chat.v112.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.channels("ChannelSid")14.invites.list({ limit: 20 });1516invites.forEach((i) => console.log(i.sid));17}1819listInvite();
1{2"invites": [],3"meta": {4"first_page_url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites?Identity=identity&PageSize=50&Page=0",5"key": "invites",6"next_page_url": null,7"page": 0,8"page_size": 50,9"previous_page_url": null,10"url": "https://chat.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Invites?Identity=identity&PageSize=50&Page=0"11}12}