The default branch name for this repository has been changed to
main as of 07/27/2020.
The documentation for the Twilio API can be found here.
The PHP library documentation can be found here.
This library supports the following PHP implementations:
You can install twilio-php via composer or by downloading the source.
twilio-php is available on Packagist as the
composer require twilio/sdk
// Send an SMS using Twilio's REST API and PHP <?php $sid = "ACXXXXXX"; // Your Account SID from www.twilio.com/console $token = "YYYYYY"; // Your Auth Token from www.twilio.com/console $client = new Twilio\Rest\Client($sid, $token); $message = $client->messages->create( '8881231234', // Text this number [ 'from' => '9991231234', // From a valid Twilio number 'body' => 'Hello from Twilio!' ] ); print $message->sid;