New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

zamtelsms

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zamtelsms

A small python Package for Zamtel bulk SMS API

  • 0.0.7
  • PyPI
  • Socket score

Maintainers
1

Zamtel bulk SMS api example in Python

Installation

pip install zamtelsms

Setup

Create a .env file in the root of your project and add the following

API_KEY=YOUR_API_KEY_FROM_ZAMTEL
SENDER_ID=YOUR_SENDER_ID_FROM_ZAMTEL
BASE_URL=https://bulksms.zamtel.co.zm/api/v2.1/action/send/

  • API_KEY is the API_KEY you were given by Zamtel
  • SENDER_ID is the SENDER_ID you were given by Zamtel

Usage

You can use the function to send a single here is an example

from sms import send_sms

response = send_sms('0975442232', 'Hello there, I am testing the Zamtel Bulk SMS API')

print(response)

You can also pass an array of phone numbers to send a sms SMS to multiple clients.

from zamtelsms.sms import send_sms

phone_numbers = ['0976xxxxxx','0976xxxxxx','0976xxxxxx','0976xxxxxx','0976xxxxxx',]

message = 'Hello there, I am testing the Zamtel Bulk SMS API'

response =  send_sms(phone_numbers, message)

print(response)

# output

{'success': True, 'responseText': 'SMS(es) have been queued for delivery'}

It is as simple as that 😃

Happy coding!!

Keywords

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc