EnvoiSMS Python SDK
Official Python SDK for EnvoiSMS.ma — SMS, WhatsApp & OTP API platform for Morocco.
For full API documentation and specifications, visit EnvoiSMS Documentation.
Installation
pip install envoisms
Quick Start
import os
from envoisms import EnvoiSMSClient
client = EnvoiSMSClient(api_key=os.getenv("ENVOISMS_API_KEY"))
# Send SMS
response = client.send(
to="+212600000000",
message="Votre code de vérification est 492018",
from_sender="MonBusiness"
)
print(f"Message ID: {response['id']}")
OTP Verification
# 1. Send OTP
otp_res = client.send_otp(
to="+212600000000",
brand="MonBusiness",
code_length=6,
expiry=600
)
session_id = otp_res["session_id"]
# 2. Verify User Code
check_res = client.check_otp(
session_id=session_id,
code="492018"
)
if check_res.get("verified"):
print("OTP code is valid!")
Documentation
Comprehensive API guide: https://envoisms.ma/fr/docs.
License
MIT
Release files for envoisms 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| envoisms-1.0.0.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| envoisms-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / envoisms-1.0.0.tar.gz
| Download URL | envoisms-1.0.0.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d660887cb427894b5cc3167b223d85dd50598bb6fe635818932398750ecff35
|
|
BLAKE2b-256 checksum How to use checksums |
c7b457a37d322d4e0d6f941bb793f017d101e9669cc1753684c79a1cee7157df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Release files / envoisms-1.0.0-py3-none-any.whl
| Download URL | envoisms-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f67557cfe7603190b476c39ed33874a6434d7e6a9218fc3de0ade4d55684dd7b
|
|
BLAKE2b-256 checksum How to use checksums |
67caa00f799a2633232cd9c9c2d7126ed08a48f7625412be554f38cd7f4f6503
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|