
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
A Python client library for the MSG91 API.
pip install msg91-py
Note: The package name on PyPI is
msg91-py
, but the module name for imports is stillmsg91
.
from msg91 import Client
# Initialize client with your auth key
client = Client("your_auth_key")
# Send SMS using a template
response = client.sms.send(
template_id="your_template_id",
mobile="9199XXXXXXXX",
variables={"var1": "value1", "var2": "value2"},
sender_id="SENDER"
)
print(response)
# Send SMS to multiple recipients
response = client.sms.send(
template_id="your_template_id",
mobile=["9199XXXXXXXX", "9198XXXXXXXX"],
variables={"var1": "value1", "var2": "value2"},
sender_id="SENDER"
)
print(response)
# Create a new template
response = client.template.create(
template_name="Welcome",
template_body="Welcome to our service, {{var1}}!",
sender_id="SENDER",
sms_type="NORMAL" # Options: NORMAL, UNICODE
)
print(response)
# Get template versions
template_versions = client.template.get("template_id")
print(template_versions)
# Add a new version to an existing template
response = client.template.add_version(
template_id="template_id",
template_body="Welcome to our service, {{var1}}! New version.",
sender_id="SENDER"
)
print(response)
# Set a template version as default
response = client.template.set_default(
template_id="template_id",
version_id="version_id"
)
print(response)
# Get SMS logs
logs = client.sms.get_logs(
start_date="2023-01-01",
end_date="2023-01-31"
)
print(logs)
# Get analytics
analytics = client.sms.get_analytics()
print(analytics)
# Get analytics for specific date range
analytics = client.sms.get_analytics(
start_date="2023-01-01",
end_date="2023-01-31"
)
print(analytics)
The client uses the following MSG91 API endpoints:
flow
report/logs/p/sms
report/analytics/p/sms
sms/addTemplate
sms/addTemplateVersion
sms/getTemplateVersions
sms/markActive
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A Python client library for the MSG91 SMS API
We found that msg91-py demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.