Skip to content

Instantly share code, notes, and snippets.



Last active Dec 10, 2015
What would you like to do?
Twilio API: Sending a Text Message
require 'Services/Twilio.php';
$sid = "aaabbbcccdddeeefffggg"; // Your Account SID from
$token = "hhhiiijjjkkklllmmmnnnooo"; // Your Auth Token from
$client = new Services_Twilio( $sid, $token );
$message = $client->account->sms_messages->create(
'+44xxx', // From a valid Twilio number
'+44yyy', // Text this number
"The message to send"
echo $message->sid;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment