PHP Classes

Minimal Twilio PHP API Send SMS: Send SMS messages using the Twilio API

Recommend this page to a friend!
  Info   View files Example   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-04-19 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 174 This week: 7All time: 8,559 This week: 41Up
Version License PHP version Categories
twiliominimal 1.0.0MIT/X Consortium ...7Wireless and Mobile, Web services, PHP 7
Description Author

This package can be used to send SMS messages using the Twilio API.

It can send HTTP requests to the Twilio API Web server to send a given text to a recipient with a given phone number from a given sender number.

A separate class can be used to send SMS messages with a minimal amount of calling code.

Innovation Award
PHP Programming Innovation award nominee
April 2020
Nominee
Vote
Twilio is a popular service for sending SMS messages and providing other telephone base services.

This package provide a PHP API to send SMS messages using the Twilio API using just two lines of code.

Manuel Lemos
  Performance   Level  
Name: Niko Peikrishvili <contact>
Classes: 1 package by
Country: Georgia Georgia
Age: ???
All time rank: 41025 in Georgia Georgia
Week rank: 41 Up2 in Georgia Georgia Up
Innovation award
Innovation award
Nominee: 1x

Details

TwilioMinimal

Build Status Coverage

Minimal Twilio package just for sending SMS Messages

Supported PHP Versions

  • 7.1
  • 7.2
  • 7.3
  • 7.4

Instalation Via Composer:

TwilioMinimal is available on Packagist as the nikopeikrishvili/twiliominimal package:

composer require nikopeikrishvili/twiliominimal

Quickstart

Send an SMS

<?php
require __DIR__ . '/vendor/autoload.php';

use NikoPeikrishvili\TwilioMinimal\TwilioConfig;
use NikoPeikrishvili\TwilioMinimal\TwilioMinimal;

$config = new TwilioConfig();
// Sender phone number 
$config->setSenderNumber("");
// Client SID
$config->setClientSid("");
// Client Auth Token
$config->setAuthToken("");

$twilio = new TwilioMinimal($config);

$twilio->send("+00000000000", "Message body");

Testing

composer test

Coding style checks

composer cs

  Files folder image Files  
File Role Description
Files folder imageExamples (1 file)
Files folder imagesrc (2 files, 1 directory)
Files folder imagetests (2 files)
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpcs.xml Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Read me

  Files folder image Files  /  Examples  
File Role Description
  Accessible without login Plain text file sendMessage.php Example Example script

  Files folder image Files  /  src  
File Role Description
Files folder imageExceptions (3 files)
  Plain text file TwilioConfig.php Class Class source
  Plain text file TwilioMinimal.php Class Class source

  Files folder image Files  /  src  /  Exceptions  
File Role Description
  Plain text file InvalidTextSizeException.php Class Class source
  Plain text file InvalidTwilioConfigException.php Class Class source
  Plain text file UnableToSendMessageException.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file TwilioConfigTest.php Class Class source
  Plain text file TwilioMinimalTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:174
This week:7
All time:8,559
This week:41Up

For more information send a message to info at phpclasses dot org.