twilio-php

0

The default branch name for this repository has been changed to main as of 07/27/2020.

 

Documentation

The documentation for the Twilio API can be found here.

The PHP library documentation can be found here.

 

Versions

twilio-php uses a modified version of Semantic Versioning for all changes. See this document for details.

 

Supported PHP Versions

This library supports the following PHP implementations:

  • PHP 7.2
  • PHP 7.3
  • PHP 7.4

 

Installation

You can install twilio-php via composer or by downloading the source.

 

Via Composer:

twilio-php is available on Packagist as the twilio/sdk package:

composer require twilio/sdk

 

Quickstart

 

Send an SMS

// 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;

OTROS POSTS