Search

Create Channel

Last Updated: Nov 4, 2020

Articles

Use this function to create a chat channel in the twilio application.

Syntax

Create Channel (token, account_sid, servic_id)

Parameters

Input Parameter Name Description
token Used for authentication
account_sid Used for authentication
servic_id ID of the Service in which the channel has to be created

Returns

Return Value Description
Output
  • On Success: 1, Channel ID
  • On Failure: 0, Error Message

Sample

Create Channel (ABCDCEF, NC-45, New Channel)

  • Uses the token ‘ABCDCEF’ and the account_sid ‘NC-45’ to authenticate the connection to the Twilio application, creates a channel with name ‘New Channel’.
    Returns the ‘Channel ID’ of the created channel.

To view all the Twilio functions, click here.

Did you find what you were looking for?