Created
October 28, 2016 16:21
-
-
Save jmadden/d68ec724ff652ec76cdc8d2446beb2e3 to your computer and use it in GitHub Desktop.
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 | |
// 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