Search

Send Message

Last Updated: Mar 15, 2021

Articles

Use this function to send a message to the verified number.

Syntax

Send Message (token, account_sid, from_number, to_number, message_body)

Parameters

Input Parameter Name Description
token Used for authentication
account_sid Used for authentication
from_number Twilio registered number to make a call
to_number Twilio registered number to connect a call
message_body Message to be sent

To know more about token and account_sid, click here.

Returns

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

Sample

Send Message (ABCDCEF, QWERTY, +911234567890, +910987654321, Hello)

  • Uses token ABCDCEF and account_sid QWERTY to authenticate connection to Twilio, sends the message Hello from the number +911234567890 to the number +910987654321.
    Returns the Message ID of the sent message.

To view all the Twilio functions, click here.

Did you find what you were looking for?