Our Advanced Messaging Platform cleverly routes traffic via SMS or IM based on your preferences for delivery and unique knowledge of your audience or it can determine the best way to deliver your message based on factors such as content, cost and deliverability rates.

1.0.4 2017-03-27 15:25 UTC


This PHP SDK allows you to send messages via SMS or Instant Messages (e.g VIBER) through the Advanced Messaging Platform (AMP) service from Fortytwo Telecom

AMP allows you to send an Instant Message with text, buttons and/or images to end users as well as SMS. The system can be configured in a way that if the end user is not reachable via Instant Messaging, an SMS is sent as a fallback thus ensuring that the end-user is reached.

Create an Account

In order to use the Advanced Messaging Platform, a token is required to autenticate with Fortytwo. This token can be created by [Registering Here] (

Once registered, in the control panel please go to "IM" > "Tokens" and Add a New Token. The token generated above will be used in the code


Install Composer.

In the root path of your project you have to add the SDK as dependency:

    composer require fortytwo/php-sdk-advanced-messaging-platform
    composer install


 * This Example sends an SMS to a phone number
 * NOTE: If you want to test you have to replace <INSERT_TOKEN_HERE> with a valid token and <PHONE_NUMBER> with a mobile phone number including prefix (e.g 356880000001) .
use Fortytwo\SDK\AdvancedMessagingPlatform\AdvancedMessagingPlatform;
use Fortytwo\SDK\AdvancedMessagingPlatform\Entities\DestinationEntity;
use Fortytwo\SDK\AdvancedMessagingPlatform\Entities\SMSContentEntity;
use Fortytwo\SDK\AdvancedMessagingPlatform\Entities\RequestBodyEntity;

// Using the Composer autoload
require dirname(__FILE__) . '/../vendor/autoload.php';

// Declaring some dependencies for the Serializer
$root = dirname(__FILE__);
    $root . "/../vendor/jms/serializer/src"

// To change with a correct token and phone number.

try {
    $messaging = new AdvancedMessagingPlatform(TOKEN);

    //Set destination
    $destination = new DestinationEntity();

    //SMS Content
    $SMS = new SMSContentEntity();

        ->setMessage('This is a test SMS message from Fortytwo.')

    $request = new RequestBodyEntity();


    $response = $messaging->sendMessage($request);

    echo $response->getResultInfo()->getDescription() ."\n";

} catch (\Exception $e) {
    echo $e->getMessage();

For a full list of examples, go to the examples folder.