Skip to content

Repository files navigation

Python API Client

Installation

Make sure you have Python 3 installed.

pip3 install sms77api

Methods

def__init__(self, api_key: str, sent_with: str='Python'):
passdefanalytics(self, params={}):
passdefbalance(self, api_key: str=None):
passdefcontacts(self, action: ContactsAction, params: dict= {}):
passdefhooks(self, action: HooksAction, params: dict= {}):
passdefjournal(self, typ: JournalType, params: dict= {}):
passdeflookup(self, typ: LookupType, number: str, json: bool=False):
passdefpricing(self, format_: PricingFormat=PricingFormat.CSV, country: str=None):
passdefsms(self, to: str, text: str, params: dict= {}):
passdefstatus(self, msg_id: int):
passdefsubaccounts(self, action: SubaccountsAction, params: dict= {}):
passdefvalidate_for_voice(self, number: str, callback: str=None):
passdefvoice(self, to: str, text: str, params: dict= {}):
pass

Examples

Retrieve balance associated with given API key

fromsms77api.Sms77apiimportSms77apiclient=Sms77api("InsertYourSuperSecretApiKeyFromSms77")
print(client.balance())

Send an SMS and return a detailed JSON response

fromsms77api.Sms77apiimportSms77apiimportosclient=Sms77api(os.environ.get('SMS77_API_KEY', 'FallbackValueIfMissing'))
print(client.sms('+491771783130', 'Hi friend!', {'json': True}))

Support

Need help? Feel free to contact us.

License

MIT

Releases

Used by

Contributors

Languages