Search

Create Service

Last Updated: Mar 15, 2021

Articles

Use this function to create a chat service in Twilio.

Syntax

Create Service (token, account_sid, friendly_name)

Parameters

Input Parameter Name Description
token Used for authentication
account_sid Used for authentication
friendly_name Contact name of the verified caller

To know more about token and account_sid, click here.

Returns

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

Sample

Create Service (ABCDCEF, QWERTY, New Service)

  • Uses token ABCDCEF and account_sid QWERTY to authenticate connection to Twilio, creates a service with name New Service.
    Returns the Service ID of the created service.

To view all the Twilio functions, click here.

Did you find what you were looking for?