Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPPanel Python SDK

Official Python client for the IPPanel SMS API.

Installation

You can install the package via pip:

pip install ippanel-python-sdk

Usage

from ippanel import Client

# Initialize the client
client = Client("YOUR_API_KEY")

# Send a simple message via webservice
response = client.send_webservice(
    message="Hello, this is a test message",
    sender="YOUR_SENDER_NUMBER",
    recipients=["RECIPIENT_NUMBER_1", "RECIPIENT_NUMBER_2"]
)
print(response)

# Send a pattern message
response = client.send_pattern(
    pattern_code="YOUR_PATTERN_CODE",
    sender="YOUR_SENDER_NUMBER",
    recipient="RECIPIENT_NUMBER",
    params={
        "name": "John Doe",
        "otp": "12345"
    }
)
print(response)

# Send a voice OTP
response = client.send_votp(
    code=12345,
    recipient="RECIPIENT_NUMBER"
)
print(response)

API Documentation

Initialization

client = Client(api_key, base_url=None)

Methods

Send Web Service Message

client.send_webservice(message, sender, recipients)
  • message: Text message to send
  • sender: Sender phone number
  • recipients: List of recipient phone numbers

Send Pattern Message

client.send_pattern(pattern_code, sender, recipient, params)
  • pattern_code: The pattern code
  • sender: Sender phone number
  • recipient: Recipient phone number
  • params: Dictionary of parameters for the pattern

Send Voice OTP

client.send_votp(code, recipient)
  • code: OTP code (integer or string)
  • recipient: Recipient phone number

License

MIT

About

Official Python client for the IPPanel SMS API.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages