Skip to main content

A simple and easy to use Python package to send SMS using MSG91 SMS API.

Project description

MSG91 SMS Package for Python

With this Python package you can send SMS using MSG91 SMS API. This Python package allow to send transactional SMS, promotional SMS, OTP SMS, verify OTP and resend OTP.

How to use?

This package uses requests and json module. So first you have to import these packages:

import json
import requests as req

Then import the msg91-sms package:

import msg91_sms as msgsms

Working with SMS

First start with your SMS auth key:

msgclass = msgsms.Cspd_msg91(apikey='Your MSG91 AKI Key')

Send SMS

msgclass.send(route,sender,phone_number,SMS_text)

Send OTP

msgclass.send_otp(sender,phone_number,SMS_text)

Verify OTP

msgclass.verify_otp(phone_number,OTP_code)

Resend OTP

msgclass.resend_otp(phone_number)

Project details


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-1.0.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

msg91_sms-1.0.1-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page