Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

swagger-client

The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.

This Python package is automatically generated by the Swagger Codegen project:

  • API version: 1.4.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/TheSMSWorks/smsw-python-sdk.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/TheSMSWorks/smsw-python-sdk.git)

Then import the package:

import swagger_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import swagger_client

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AuthApi(swagger_client.ApiClient(configuration))
customerid = 'customerid_example' # str | Utility method. Please generate your API key by following the instructions on your account page at https://thesmsworks.co.uk/user/login

try:
    api_response = api_instance.key_secret(customerid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->key_secret: %s\n" % e)

# create an instance of the API class
api_instance = swagger_client.AuthApi(swagger_client.ApiClient(configuration))
body = swagger_client.Login() # Login | API Key & Secret

try:
    api_response = api_instance.login(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthApi->login: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.thesmsworks.co.uk/v1

Class Method HTTP request Description
AuthApi key_secret GET /auth/getApiKey
AuthApi login POST /auth/token
BatchMessagesApi cancel_scheduled_batch_job DELETE /batches/schedule/{batchid}
BatchMessagesApi get_batch_by_id GET /batch/{batchid}
BatchMessagesApi schedule_batch POST /batch/schedule
BatchMessagesApi send_batch POST /batch/send
CreditsApi credits GET /credits/balance
MessagesApi cancel_scheduled_job DELETE /messages/schedule/{messageid}
MessagesApi get_failed_messages POST /messages/failed
MessagesApi get_inbox_messages POST /messages/inbox
MessagesApi get_message_by_id GET /messages/{messageid}
MessagesApi get_messages POST /messages
MessagesApi schedule_message POST /message/schedule
MessagesApi send_flash_message POST /message/flash
MessagesApi send_message POST /message/send
UtilsApi get_error GET /utils/errors/{errorcode}
UtilsApi test GET /utils/test

Documentation For Models

Documentation For Authorization

JWT

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

Author

About

Python client SDK for The SMS Works API

Resources

Releases

No releases published

Packages

No packages published