Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SMS notification using the Twilio API
// Get the PHP helper library from
require_once 'twilio/autoload.php'; // Loads the library
use Twilio\Rest\Client;
// Your account details via
$sid = "xxxxxxxxxxxxxxxxxx"; //Account Sid
$token = "xxxxxxxxxxxxxxxxxx"; //Auth Token
$client = new Client($sid, $token);
'+xxxxxxxxx', //Destination number
'from' => '+xxxxxxxxx', //Source (twilio) number
'body' => "Message" //Message to be delivered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment