Rupal
Rupal

Reputation: 49

How to delete message logs in twilio trial account?

I am using twilio trial account for sending message and it generate SMS logs. I want to remove all SMS logs from my trial account of twilio. please help me.

Upvotes: 2

Views: 822

Answers (1)

Devin Rader
Devin Rader

Reputation: 10366

You can use the PHP helper library to redact the body of a message, or delete the entire message resource:

$client = new Services_Twilio('AC123', '123');
$message = $client->account->messages->get("MM123");
$message->redact(); // Erases 'Body' field contents
$message->delete(); // Deletes entire message record

More info on deleting message can be found in our docs.

Hope that helps.

Upvotes: 1

Related Questions