Search

Delete Message

Last Updated: Feb 14, 2022

Articles

Use this function to delete the given message in Twilio.

Syntax

Delete Message (token, account_sid, message_id)

Parameters

Input Parameter Name Description
token Used for authentication
account_sid Used for authentication
message_id ID of the message to delete

To know more about token and account_sid, click here.

Returns

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

Sample

Delete Message (ABCDCEF, QWERTY, DD-23)

  • Uses token ABCDCEF and account_sid QWERTY to authenticate connection to Twilio, deletes message with ID DD-23.
    Returns Message Deleted Successfully on deleting the message.

To view all the Twilio functions, click here.

Did you find what you were looking for?