phpcodex / smsw-php-sdk
1.0.0
2019-06-11 09:58 UTC
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2025-04-11 22:54:10 UTC
README
The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 1.0.0
- Build package: io.swagger.codegen.languages.PhpClientCodegen
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/phpcodex/smsw-php-sdk.git"
}
],
"require": {
"phpcodex/smsw-php-sdk": "^1.0.0"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/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 Swagger\Client\Api\AuthApi( // 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() ); $customerid = "customerid_example"; // string | The Customer ID try { $result = $apiInstance->keySecret($customerid); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthApi->keySecret: ', $e->getMessage(), PHP_EOL; } ?>
Test calls in Postman
Documentation for API Endpoints
All URIs are relative to https://api.thesmsworks.co.uk/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AuthApi | keySecret | GET /auth/getApiKey | |
AuthApi | login | POST /auth/token | |
BatchMessagesApi | cancelScheduledBatchJob | DELETE /batches/schedule/{batchid} | |
BatchMessagesApi | getBatchById | GET /batch/{batchid} | |
BatchMessagesApi | scheduleBatch | POST /batch/schedule | |
BatchMessagesApi | sendBatch | POST /batch/send | |
MessagesApi | cancelScheduledJob | DELETE /messages/schedule/{messageid} | |
MessagesApi | getInboxMessages | POST /messages/inbox | |
MessagesApi | getMessageById | GET /messages/{messageid} | |
MessagesApi | getMessages | POST /messages | |
MessagesApi | scheduleMessage | POST /message/schedule | |
MessagesApi | sendMessage | POST /message/send | |
UtilsApi | test | GET /utils/test |
Documentation For Models
- ApiKeyResponse
- BatchMessage
- BatchMessageResponse
- CancelledMessageResponse
- ErrorModel
- Login
- Message
- MessageMetadata
- MessageResponse
- MessageResponseFailurereason
- MessagesResponse
- MessagesResponseMessages
- MetaData
- Query
- QueryMetadata
- ScheduledBatchResponse
- ScheduledMessageResponse
- SendMessageResponse
- TestResponse
- TokenResponse
- ExtendedErrorModel
Documentation For Authorization
JWT
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header