telstra / messagingapi-sdk-php
This package is abandoned and no longer maintained.
No replacement package was suggested.
1.0.6
2018-08-10 06:57 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
README
- API version: 2.2.9
- Package version: 1.0.6
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/Telstra/MessagingAPI-SDK-php.git"
}
],
"require": {
"Telstra/MessagingAPI-SDK-php": "*@master"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new Telstra_Messaging\Api\AuthenticationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); $client_id = 'client_id_example'; // string | $client_secret = 'client_secret_example'; // string | $grant_type = 'client_credentials'; // string | try { $result = $apiInstance->authToken($client_id, $client_secret, $grant_type); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthenticationApi->authToken: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to https://tapi.telstra.com/v2
Class | Method | HTTP request | Description |
---|---|---|---|
AuthenticationApi | authToken | POST /oauth/token | Generate OAuth2 token |
MessagingApi | getMMSStatus | GET /messages/mms/{messageid}/status | Get MMS Status |
MessagingApi | getSMSStatus | GET /messages/sms/{messageId}/status | Get SMS Status |
MessagingApi | retrieveMMSResponses | GET /messages/mms | Retrieve MMS Responses |
MessagingApi | retrieveSMSResponses | GET /messages/sms | Retrieve SMS Responses |
MessagingApi | sendMMS | POST /messages/mms | Send MMS |
MessagingApi | sendSMS | POST /messages/sms | Send SMS |
ProvisioningApi | createSubscription | POST /messages/provisioning/subscriptions | Create Subscription |
ProvisioningApi | deleteSubscription | DELETE /messages/provisioning/subscriptions | Delete Subscription |
ProvisioningApi | getSubscription | GET /messages/provisioning/subscriptions | Get Subscription |
Documentation For Models
- DeleteNumberRequest
- GetSubscriptionResponse
- InboundPollResponse
- MMSContent
- Message
- MessageSentResponse
- OAuthResponse
- OutboundPollResponse
- ProvisionNumberRequest
- ProvisionNumberResponse
- SendMmsRequest
- SendSMSRequest
- Status
Documentation For Authorisation
auth
- Type: OAuth
- Flow: application
- Authorisation URL:
- Scopes:
- NSMS: NSMS