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
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 |
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
unlimited_messaging-0.1.0.tar.gz
(19.4 kB
view details)
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.0.tar.gz.
File metadata
- Download URL: unlimited_messaging-0.1.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcaafef38bd3c34d24b0593542ca74f3e96ac9fadb0a4a6e6fe4b058d08ff1c5
|
|
| MD5 |
08859a9d372e2477b547265df4da5ed2
|
|
| BLAKE2b-256 |
0f3bdaaca176fec76ce1fd64e5e6e4a686e356f1592d694bb2b3424dcd98df41
|
File details
Details for the file unlimited_messaging-0.1.0-py3-none-any.whl.
File metadata
- Download URL: unlimited_messaging-0.1.0-py3-none-any.whl
- Upload date:
- Size: 31.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aa1ed02a279aa5e78b122a899695e46ee5cc1a813d99efb12702dd8f3cffce7
|
|
| MD5 |
b08a584abe6f8ee09853e447ec1ab1e5
|
|
| BLAKE2b-256 |
9142f0d5683bc620dd8ff20dbb7b1ee3c41d66aec4a9e6ac4e033dd20a81da9c
|