PHPackages                             messagemedia/messages-sdk - 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. messagemedia/messages-sdk

ActiveLibrary[API Development](/categories/api)

messagemedia/messages-sdk
=========================

The MessageMedia Messages API provides a number of endpoints for building powerful two-way messaging applications.

2.1.0(3y ago)13390.6k↓21.3%6[2 issues](https://github.com/messagemedia/messages-php-sdk/issues)Apache-2.0PHPPHP &gt;=5.4.0

Since Nov 21Pushed 10mo ago7 watchersCompare

[ Source](https://github.com/messagemedia/messages-php-sdk)[ Packagist](https://packagist.org/packages/messagemedia/messages-sdk)[ Docs](https://developers.messagemedia.com)[ RSS](/packages/messagemedia-messages-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (9)Used By (0)

🚨 Repository Deprecated – No Longer Maintained
----------------------------------------------

[](#-repository-deprecated--no-longer-maintained)

> **Important:** This SDK is no longer maintained.

This repository (`Messages PHP SDK`) has not been actively maintained for several years and is now officially **deprecated**. No further updates, bug fixes, or support will be provided.

If you're building applications that integrate with the Sinch MessageMedia Messaging API, we recommend using direct REST API calls instead. You can find the complete and up-to-date API documentation here:
👉 [MessageMedia Messaging REST API Docs](https://messagemedia.github.io/documentation/#tag/Messages)

The source code remains available under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). Feel free to fork and update it to suit your needs.

MessageMedia Messages PHP SDK
=============================

[](#messagemedia-messages-php-sdk)

[![Pull Requests Welcome](https://camo.githubusercontent.com/7d9ed3c8f22eceb1711573169b1390cc0b1194467340dc815205060c162b5309/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e7376673f7374796c653d666c6174)](http://makeapullrequest.com)[![HitCount](https://camo.githubusercontent.com/cf326c5d563f43ca34e658f78d719b81aeb735c00900c36478c816155ca06938/687474703a2f2f686974732e6477796c2e696f2f6d6573736167656d656469612f6d657373616765732d7068702d73646b2e737667)](http://hits.dwyl.io/messagemedia/messages-php-sdk)[![composer](https://camo.githubusercontent.com/000db190333133c12460e699b5a16ec0d34ad582e1ffc1270d73f8b385fe02e3/68747470733a2f2f62616467652e667572792e696f2f70682f6d6573736167656d656469612532466d657373616765732d73646b2e737667)](https://packagist.org/packages/messagemedia/messages-sdk)

The MessageMedia Messages API provides a number of endpoints for building powerful two-way messaging applications.

[![Isometric](https://camo.githubusercontent.com/004f1658a1df617f27c13719f7f36b36ce6396db4bf907d4536a0b04ae0ab126/68747470733a2f2f692e696d6775722e636f6d2f6a4a65487766352e706e67)](https://camo.githubusercontent.com/004f1658a1df617f27c13719f7f36b36ce6396db4bf907d4536a0b04ae0ab126/68747470733a2f2f692e696d6775722e636f6d2f6a4a65487766352e706e67)

Table of Contents
-----------------

[](#table-of-contents)

- [Authentication](#closed_lock_with_key-authentication)
- [Errors](#interrobang-errors)
- [Information](#newspaper-information)
    - [Slack and Mailing List](#slack-and-mailing-list)
    - [Bug Reports](#bug-reports)
    - [Contributing](#contributing)
- [Installation](#star-installation)
- [Get Started](#clapper-get-started)
- [API Documentation](#closed_book-api-documentation)
- [Need help?](#confused-need-help)
- [License](#page_with_curl-license)

🔐 Authentication
----------------

[](#closed_lock_with_key-authentication)

Authentication is done via API keys. Sign up at  to get your API keys.

Requests are authenticated using HTTP Basic Auth or HMAC. For Basic Auth, your API key will be basicAuthUserName and API secret will be basicAuthPassword. For HMAC, your API key will be hmacAuthUserName and API secret will be hmacAuthPassword. This is demonstrated in the [Send an SMS example](#send-an-sms) below.

⁉️ Errors
---------

[](#interrobang-errors)

Our API returns standard HTTP success or error status codes. For errors, we will also include extra information about what went wrong encoded in the response as JSON. The most common status codes are listed below.

#### HTTP Status Codes

[](#http-status-codes)

CodeTitleDescription400Invalid RequestThe request was invalid401UnauthorizedYour API credentials are invalid403Disabled featureFeature not enabled404Not FoundThe resource does not exist50XInternal Server ErrorAn error occurred with our API📰 Information
-------------

[](#newspaper-information)

#### Mailing List

[](#mailing-list)

If you have any questions, comments, or concerns, please email us at:

#### Bug reports

[](#bug-reports)

If you discover a problem with the SDK, we would like to know about it. You can raise an [issue](https://github.com/messagemedia/signingkeys-php-sdk/issues) or send an email to:

#### Contributing

[](#contributing)

We welcome your thoughts on how we could best provide you with SDKs that would simplify how you consume our services in your application. You can fork and create pull requests for any features you would like to see or raise an [issue](https://github.com/messagemedia/messages-php-sdk/issues). Please be aware that a large share of the files are auto-generated by our backend tool.

⭐ Installation
--------------

[](#star-installation)

Run the Composer command to install the latest stable version of the Messages SDK:

```
composer require messagemedia/messages-sdk

```

🎬 Get Started
-------------

[](#clapper-get-started)

It's easy to get started. Simply enter the API Key and secret you obtained from the [MessageMedia Developers Portal](https://developers.messagemedia.com) into the code snippet below and a mobile number you wish to send to.

### Send an SMS

[](#send-an-sms)

Destination numbers (`destinationNumber`) should be in the [E.164](http://en.wikipedia.org/wiki/E.164) format. For example, `+61491570156` NOT `0491570156`. The code snippet below comprises of only the bare minimum parameters required to send a message. You can view the full list of parameters over [here](https://github.com/messagemedia/messages-php-sdk/wiki/Message-Body-Parameters). Alternatively, you can refer [this](https://github.com/messagemedia/messages-php-sdk/blob/master/examples/sendMessage.php) code snippet with all the parameters in use.

```

```

### Send an MMS

[](#send-an-mms)

Destination numbers (`destinationNumber`) should be in the [E.164](http://en.wikipedia.org/wiki/E.164) format. For example, `+61491570156` NOT `0491570156`. The code snippet below comprises of only the bare minimum parameters required to send a message. You can view the full list of parameters over [here](https://github.com/messagemedia/messages-nodejs-sdk/wiki/Message-Body-Parameters). Alternatively, you can refer this code snippet with all the parameters in use.

```
