Skip to content

Python module for communicating with MOBtexting enterprise Messaging and Verify Services

Notifications You must be signed in to change notification settings

mobtexting/mobtexting-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

python plugin for mobtexting

This package makes it easy to send Mobtexting notifications.

Installation

You can install the package via pip :

pip install git+git://github.com/mobtexting/mobtexting-python.git --user

Send SMS Usage

from mobtexting.client import Client

access_token = 'xxxxxxxxxxxxxxxxxx'

client = Client(access_token)

response = client.send(
    to="1234567890",
    _from="MobTxt",
    body="Hello from Python!",
    service="P"
)

print response.json()

Verify Usage

from mobtexting.verify import Verify

access_token = 'xxxxxxxxxxxxxxxxxx'

verify = Verify(access_token)

Send

response = verify.send(
    to="1234567890",
)

print response.json()

With optional paramaters

response = verify.send(
    to="1234567890",
    data = {
        'length': 4,
        'timeout': 600
    }
)

print response.json()

visit documentation for a list of all parameters

Check

response = verify.check(
    id='b51be650-fdb2-4633-b101-d450e8d9ec64', # id received while sending
    token='123456' # token entered by user
)

print response.json()

Cancel

response = verify.cancel(
    id='4e28e081-2900-4523-aed6-a21eb39c2ae6' # id received while sending
)

print response.json()

About

Python module for communicating with MOBtexting enterprise Messaging and Verify Services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages