Python SDK for the Unlimited Messaging API
Project description
unlimited-messaging
Official Python client for the Unlimited Messaging API — send and receive WhatsApp messages programmatically.
- Website: unlimitedmessaging.app
- Docs: docs.unlimitedmessaging.app
- API reference: api.unlimitedmessaging.app
- GitHub: unlimitedmessaging/unlimited-messaging-sdk
- PyPI: unlimited-messaging
Installation
pip install unlimited-messaging
Quick start
import os
from unlimited_messaging import UnlimitedMessagingApi
client = UnlimitedMessagingApi(
token=os.environ["API_TOKEN"],
)
# Send a WhatsApp message
message = client.message.message_controller_send(
recipient="+33612345678",
text="Hello!",
)
print(message.id, message.status)
Authentication
Get your API token from the dashboard and pass it as the token argument.
client = UnlimitedMessagingApi(token="your_api_token")
Examples
Send a message
message = client.message.message_controller_send(
recipient="+33612345678",
text="Hello from the SDK!",
sim_id="optional-sim-id", # force a specific SIM
)
List messages
result = client.message.message_controller_find_all(
page=1,
limit=20,
status="DELIVERED", # PENDING | SENDING | SENT | DELIVERED | READ | FAILED
search="keyword",
)
print(f"{result.total} messages")
for msg in result.data:
print(msg.id, msg.status, msg.text)
List linked SIMs
sims = client.sim.sim_controller_get_linked_sims()
for sim in sims:
print(sim.id, sim.phone_number)
Async support
import asyncio
from unlimited_messaging import AsyncUnlimitedMessagingApi
client = AsyncUnlimitedMessagingApi(token="your_api_token")
async def main():
message = await client.message.message_controller_send(
recipient="+33612345678",
text="Hello async!",
)
print(message.id, message.status)
asyncio.run(main())
API reference
| Method | Description |
|---|---|
message.message_controller_send |
Send a WhatsApp message |
message.message_controller_find_all |
List messages with pagination and filters |
sim.sim_controller_get_linked_sims |
List linked SIMs |
Official documentation: docs.unlimitedmessaging.app Full OpenAPI spec: openapi.yaml
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unlimited_messaging-0.1.2.tar.gz.
File metadata
- Download URL: unlimited_messaging-0.1.2.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8a92920e0509c2ac3012f6b584b742700da878c84ff3b2bfdd73fb7154ce6b0
|
|
| MD5 |
ee5d82401ffe0bf47deea1c20238787e
|
|
| BLAKE2b-256 |
20d537810da12dfb54f509a6632075adae9703a3b9cdf9b5448c732f64b90b22
|
File details
Details for the file unlimited_messaging-0.1.2-py3-none-any.whl.
File metadata
- Download URL: unlimited_messaging-0.1.2-py3-none-any.whl
- Upload date:
- Size: 32.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ac7e3514d470457af3548ddaba84842e09f4b2c06abde456428d51a1dc47a3c
|
|
| MD5 |
85bec466fbabf2bba52399a760e5df67
|
|
| BLAKE2b-256 |
e05c52ed2f96016674a1c74b10ddc67a77ec13064a82e27813c2efe15123e9f3
|