A tiny library for sending OTP and SMS via MSG91
Project description
sms91-sms-otp
This a tiny library for sending sms and otp using sms91.
Basic usage
You could simply send a message, OTP and verify otp.
from sms91.sendsms import SMSClient
cli = SMSClient()
#initializing app
# get this key from https://msg91.com
key = "31*****************P1"
# sender can be of anything in the length of 6. in inbox it will be "AX-TESTIN".
sender = "TESTIN"
# [optional] no.of char in otp. minimum 4 char
otp_size = 6
cli.initialize(key,sender,otp_size)
#send sms
#phno list should have 10 digit indian numbers.
phno = ["98XXXXXXX0,'77XXXXXXXX5"]
message = "hi! this is a test message"
cli.sendMessgae("hi",nessage)
#send otp
phno = ["98XXXXXXX0,'77XXXXXXXX5"]
cli.sendOtp(phno)
Yes, it is as simple as this.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
msg91-sms-otp-0.0.3.tar.gz
(1.7 kB
view details)
File details
Details for the file msg91-sms-otp-0.0.3.tar.gz.
File metadata
- Download URL: msg91-sms-otp-0.0.3.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2d712f7842b4f74e5b4a442d4d1ed18693bbb2979e2c6cfadb642df7243b0f7
|
|
| MD5 |
a12275eb8a4432d9dba30f99e8b6ea56
|
|
| BLAKE2b-256 |
c3522468a2258184872869202706a15ba5fb359e65ab890cd3f773499f9de28a
|