Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SMSAPI Python client. It allows you to send SMS and PUSH messages, manage Short URLs and administer your account.

License

Notifications You must be signed in to change notification settings

linhduongtuan/smsapi-python-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smsapi-python

Client for SMSAPI.

COMPATIBILITY:

Compatible with Python 2.7+, 3.+.

REQUIREMENTS:

requests

INSTALLATION:

If You have pip installed:

sudo pip install smsapi-client

else You can install manually:

git clone https://github.com/smsapi/smsapi-python-client.git

cd smsapi-python

python setup.py install

Client instance:

If You are smsapi.pl customer You should import

    from smsapi.client import SmsApiPlClient

else You need to use client for smsapi.com

    from smsapi.client import SmsApiComClient

Credentials

  • Access Token
    client = SmsApiPlClient(access_token='your-access-token')

Examples

  • Send SMS
    from smsapi.client import SmsApiPlClient
    
    client = SmsApiPlClient(access_token='your access token')
    
    r = client.sms.send(to='phone number', message='text message')
    
    print(r.id, r.points, r.status, r.error)
  • You can find more examples in "examples" directory in project files.

Error handling

    from smsapi.exception import SmsApiException

    try:
        contact = client.sms.send(to='123123')
    except SmsApiException as e:
        print(e.message, e.code)

LICENSE

Apache 2.0 License

About

SMSAPI Python client. It allows you to send SMS and PUSH messages, manage Short URLs and administer your account.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.6%
  • Makefile 0.4%