Last active
December 10, 2015 21:18
-
-
Save niraj-shah/4493701 to your computer and use it in GitHub Desktop.
Twilio API: Sending a Text Message
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'Services/Twilio.php'; | |
$sid = "aaabbbcccdddeeefffggg"; // Your Account SID from www.twilio.com/user/account | |
$token = "hhhiiijjjkkklllmmmnnnooo"; // Your Auth Token from www.twilio.com/user/account | |
$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