2017 © Pedro Peláez
 

library php-sdk-advanced-messaging-platform

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.

image

fortytwo/php-sdk-advanced-messaging-platform

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.

  • Monday, March 27, 2017
  • by Fortytwo
  • Repository
  • 2 Watchers
  • 0 Stars
  • 134 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 15 Versions
  • 2 % Grown

The README.md

FORTYTWO - PHP SDK - ADVANCED MESSAGING PLATFORM

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, (*1)

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., (*2)

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] (https://www.fortytwo.com/register/), (*3)

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, (*4)

Setup

Install Composer., (*5)

In the root path of your project you have to add the SDK as dependency:, (*6)

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

Examples:

<?php
/**
 * 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__);
Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace(
    'JMS\Serializer\Annotation',
    $root . "/../vendor/jms/serializer/src"
);

// To change with a correct token and phone number.
const TOKEN = '<INSERT_TOKEN_HERE>';
const NUMBER = '<PHONE_NUMBER>';

try {
    $messaging = new AdvancedMessagingPlatform(TOKEN);

    //Set destination
    $destination = new DestinationEntity();
    $destination->setNumber(NUMBER);

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

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

    $request = new RequestBodyEntity();

    $request
        ->addDestination($destination)
        ->setSmsContent($SMS);

    $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., (*7)

The Versions

27/03 2017

dev-master

9999999-dev

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

27/03 2017

1.0.4

1.0.4.0

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

27/03 2017

dev-senderid_special_character_fix

dev-senderid_special_character_fix

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

27/03 2017

1.0.3

1.0.3.0

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

27/03 2017

1.0.2

1.0.2.0

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

17/10 2016

1.0.1

1.0.1.0

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

26/08 2016

1.0.0

1.0.0.0

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

08/08 2016

1.0.0-RC8

1.0.0.0-RC8

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

19/07 2016

1.0.0-RC7

1.0.0.0-RC7

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

28/06 2016

1.0.0-RC6

1.0.0.0-RC6

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

31/05 2016

1.0.0-RC5

1.0.0.0-RC5

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

25/05 2016

1.0.0-RC4

1.0.0.0-RC4

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

23/05 2016

1.0.0-RC3

1.0.0.0-RC3

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.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging advanced messaging platform

20/05 2016

1.0.0-RC2

1.0.0.0-RC2

Fortytwo’s Two-Factor Authentication (2FA) API adds an additional layer of security to your users’ login credentials with a unique one-time code which limits the risk of fraudulent access to your website.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging

12/05 2016

1.0.0-RC1

1.0.0.0-RC1

Fortytwo’s Two-Factor Authentication (2FA) API adds an additional layer of security to your users’ login credentials with a unique one-time code which limits the risk of fraudulent access to your website.

  Sources   Download

MIT

The Requires

 

The Development Requires

amp fortytwo sms messaging im messaging viber messaging