Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smsroute (Python)

Official Python client for the smsroute.cc SMS API — send SMS to 150+ countries. No third-party dependencies (stdlib only).

pip install smsroute
from smsroute import SmsRoute

sms = SmsRoute()  # reads SMSROUTE_API_KEY from the environment

res = sms.send(
    to="+447700900000",     # E.164
    sender="MyBrand",       # alphanumeric sender ID - see country rules below
    text="Your code is 123456",
)
print(res)

API

Method Purpose
send(to, text, sender=None) send one message
status(message_id) delivery status
balance() account balance

Errors raise SmsRouteError with .status and .body. Requests time out after 15s.

Sender IDs differ by country

Alphanumeric sender IDs require pre-registration in many countries and are banned in some. Open dataset of the rules: sms-sender-id-regulations.

Links

MIT licensed.

About

Official Python client for the smsroute.cc SMS API - send SMS to 150+ countries, stdlib only

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages