Search

Create Channel

Last Updated: Mar 15, 2021

Articles

Use this function to create a chat channel in Twilio.

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

To know more about token and account_sid, click here.

Returns

Return Value Description
Output
  • On Success returns 1 | Channel ID
  • On Failure returns 0 | Error Message

Sample

Create Channel (ABCDCEF, QWERTY, ABC123)

  • Uses token ABCDCEF and account_sid QWERTY to authenticate connection to Twilio, creates a channel in the service with ID ABC123.
    Returns the Channel ID of the created channel.

To view all the Twilio functions, click here.

Did you find what you were looking for?