Skip to content

bmostafa87/messagemedia-rest-api-php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

.

Australia’s Leading Messaging Solutions for Business and Enterprise.

  • API version: 1.0.0
  • Build date: 2016-08-03T00:34:42.068Z

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/./autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit lib/Tests

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: hmac
MessageMedia\RESTAPI\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// MessageMedia\RESTAPI\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new MessageMedia\RESTAPI\Api\DeliveryReportsApi();
$delivery_report_id = new \MessageMedia\RESTAPI\Model\DeliveryReportId(); // \MessageMedia\RESTAPI\Model\DeliveryReportId | A list of delivery report IDs to mark as confirmed.
$account = "account_example"; // string | The account to use for this request. This account will be used for the request instead of the account assigned to the API key used to sign the request, allowing one API key to be used to perform requests on behalf of other accounts.

try {
    $api_instance->deliveryReportsConfirmedPost($delivery_report_id, $account);
} catch (Exception $e) {
    echo 'Exception when calling DeliveryReportsApi->deliveryReportsConfirmedPost: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://api.messagemedia.com/v1

Class Method HTTP request Description
DeliveryReportsApi deliveryReportsConfirmedPost POST /delivery_reports/confirmed Confirm the receipt of delivery reports.
DeliveryReportsApi deliveryReportsGet GET /delivery_reports This endpoint is used to check for unconfirmed reports.
MessagingApi messagesMessageIdGet GET /messages/{messageId} Retrive the status and details of a submitted message.
MessagingApi messagesMessageIdPut PUT /messages/{messageId} Update the status of a submitted message.
MessagingApi messagesPost POST /messages Send one or more SMS or text to voice messages.
RepliesApi repliesConfirmedPost POST /replies/confirmed Confirm the receipt of replies.
RepliesApi repliesGet GET /replies Check for unconfirmed replies.

Documentation For Models

Documentation For Authorization

hmac

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages