Skip to content

winsms/winsms-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinSMS - PHP Client

  • API version: 1.0.0
  • Package version: 1.0.0

For more information, please visit http://support.winsms.co.za/

DISCLAIMER:

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.

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/winsms/winsms-php.git"
    }
  ]
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/winsms-php/vendor/autoload.php');

Getting Started

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;
}

?>

Documentation for API Endpoints

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.

Documentation For Models

Documentation For Authorization

APIKeyHeader

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

Author

support@winsms.co.za

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published