- API version: 1.0.0
- Package version: 1.0.0
For more information, please visit http://support.winsms.co.za/
The SDK is provided as a guideline to accessing the WinSMS API. The code is provided "as is" without any guarantees. Depending on your environment, the SDK may not work "out-of-the-box", therefore it is expected that you have sufficient technical knowledge and development skills to address any coding issues that may arise from using this SDK.
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/winsms/winsms-php.git"
}
]
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/winsms-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyHeader
$config = winsms\Configuration::getDefaultConfiguration()->setApiKey('AUTHORIZATION', 'YOUR_API_KEY');
$apiInstance = new winsms\Api\CreditsApi(
// 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(),
$config
);
try {
$result = $apiInstance->getCreditBalance();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CreditsApi->getCreditBalance: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://www.winsms.co.za/api/rest/v1
Class | Method | HTTP request | Description |
---|---|---|---|
CreditsApi | getCreditBalance | GET /credits/balance | Get your current WinSMS credit balance |
CreditsApi | transferCredits | POST /credits/transfer | Transfer credits between main and sub accounts. |
ShortcodeApi | getShortCodeMessages | GET /shortcode/incoming | Get a list of incoming short/long code messages |
SmsApi | deleteScheduledMessages | POST /sms/scheduled/delete | Delete scheduled SMS messages and refund credits |
SmsApi | getIncomingMessages | GET /sms/incoming | Get a list of incoming SMS messages |
SmsApi | getOptoutMessages | GET /sms/incoming/optout | Get a list of incoming opt-out SMS messages |
SmsApi | getScheduledMessages | GET /sms/scheduled | Get a list of scheduled SMS messages |
SmsApi | smsSend | POST /sms/outgoing/send | Send SMS messages |
SmsApi | smsStatus | POST /sms/outgoing/status | Get SMS delivery statuses |
SubaccountsApi | getSubAccounts | GET /subaccounts | Get a list of all Sub Accounts. |
- CreditBalanceResponse
- CreditTransferDetails
- CreditTransferResponse
- DeleteScheduledResponse
- DeletedMessageStatus
- ErrorDetails
- IncomingMessage
- IncomingMessageResponse
- IncomingOptoutMessage
- MessageRecipientDetails
- MessageRecipientResponse
- MessageStatus
- MessageStatusResponse
- NewMessageDetails
- NewMessageResponse
- OptoutMessageResponse
- ScheduledMessage
- ScheduledMessageResponse
- ShortcodeMessage
- ShortcodeMessageResponse
- SubAccount
- SubAccountsResponse
- Type: API key
- API key parameter name: AUTHORIZATION
- Location: HTTP header