Skip to content

Instantly share code, notes, and snippets.

@jmadden
Created October 28, 2016 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmadden/d68ec724ff652ec76cdc8d2446beb2e3 to your computer and use it in GitHub Desktop.
Save jmadden/d68ec724ff652ec76cdc8d2446beb2e3 to your computer and use it in GitHub Desktop.
<?php
// PHP Helper Library was dinstalled using Composer.
// Required if your envrionment does not handle autoloading
require __DIR__ . '/vendor/autoload.php';
// Use the REST API Client to make requests to the Twilio REST API
use Twilio\Rest\Client;
// Your Account SID and Auth Token from twilio.com/console
$sid = 'AC21db4f67779b43e39665563e7658322b';
$token = 'your_auth_token';
$client = new Client($sid, $token);
// Use the client to do fun stuff like send text messages!
$client->messages->create(
// the number you'd like to send the message to
'+15558675309',
array(
// A Twilio phone number you purchased at twilio.com/console
'from' => '+15017250604',
// the body of the text message you'd like to send
'body' => 'Hey Jenny! Good luck on the bar exam!'
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment