PHPackages                             tm4b/tm4b-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. tm4b/tm4b-php

ActiveLibrary[API Development](/categories/api)

tm4b/tm4b-php
=============

PHP Client for using TM4B's REST API

v1.0.4(5y ago)156MITPHPPHP ^5.6 || ^7.0CI failing

Since Apr 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tm4b/tm4b-php)[ Packagist](https://packagist.org/packages/tm4b/tm4b-php)[ Docs](https://github.com/tm4b-com/tm4b-php)[ RSS](/packages/tm4b-tm4b-php/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (8)Versions (7)Used By (0)

[![](https://camo.githubusercontent.com/20beffc05e6efe7338e34cb3e9af8b7c838e6aee8b85e42a56d97c4148c565c8/687474703a2f2f7777772e746d34622e636f6d2f6173736574732f696d672f6c6f676f2d77686974652d6f6e2d626c75652e706e67)](https://www.tm4b.com)[![Build Status](https://camo.githubusercontent.com/84ba9c374538c4fd8004ac9baeb464b332a5000dcdf729c82ee47de98f2aaa01/68747470733a2f2f7472617669732d63692e6f72672f746d34622f746d34622d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tm4b/tm4b-php)

[Sign up](https://www.tm4b.com/en/register) for a TM4B account and visit our [Developer Api](https://www.tm4b.com/en/sms-api/) for even more content.

TM4B PHP Client
===============

[](#tm4b-php-client)

This is the official PHP library for using the TM4B REST API. This SDK contains methods for easily interacting with the TM4B Messaging API. Below are examples to get you started. For additional examples, please see our official documentation at

Installation
------------

[](#installation)

The recommended way to install TM4B PHP is through [Composer](http://getcomposer.org/). Require the `tm4b/tm4b-php` package:

```
$ composer require tm4b/tm4b-php

```

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

You should always use Composer's autoloader in your application to automatically load your dependencies. All examples below assumes you've already included this in your file:

```
require 'vendor/autoload.php';
```

Initialize your [TM4B](https://www.tm4b.com) Client with your [TM4B API Key](https://www.tm4b.com):

```
