# Python WhatsApp SDK: how few lines does it really take?

> pip install, an API key, client.messages.message_send(): send WhatsApp messages from Python scripts, Django or FastAPI backends and notebooks.

Source: https://unlimitedmessaging.app/articles/python-sdk

Python WhatsApp SDK

# Send WhatsApp messages in Python,  
_in a few lines._

A pip install, an API key, and three lines of Python are all it takes to send a WhatsApp message. The SDK handles authentication, media and webhooks for you - from your regular WhatsApp account, unlimited, without setting up Meta's official API.

[Get my API key](https://app.unlimitedmessaging.app)[See pricing](https://unlimitedmessaging.app/pricing)

The context

## How do you send a WhatsApp message in Python?

The Python SDK is a package you install from [PyPI](https://pypi.org) with pip to send WhatsApp messages from any script, backend or notebook, without writing a single HTTP request by hand.

In Python, sending a WhatsApp often comes down to a POST to a REST endpoint. You could do it with requests: build the URL, set the authentication header, serialize the JSON, check the return code, handle network errors. It works, but you rewrite the same plumbing every time - and you lose your editor's autocompletion and typing.

The Python SDK does that work for you. You run \`pip install unlimited-messaging\`, you instantiate an \`UnlimitedMessagingApi\` client with your API key, then you call \`client.messages.message\_send(recipient=..., text=...)\`. The SDK takes care of authentication, serialization, typed errors and retries. Media and webhooks follow the same logic: a Python method, not an HTTP schema to memorize.

Above all, this SDK doesn't force you to go through Meta's official WhatsApp Business API. No business account to verify, no templates to get approved, no per-message billing: messages go out from your regular WhatsApp account, unlimited, at a fixed price. It's the ideal tool for scripts, Django or FastAPI backends and data notebooks.

![Illustration: two packages labelled pip install and npm install, with the headline “WhatsApp from Python in a few lines”.](https://unlimitedmessaging.app/_next/image?url=%2Fassets%2Farticles%2Fcovers%2Fpython-sdk-en.png&w=3840&q=75)

Definition
Python SDK (Unlimited Messaging)

A Python library that wraps the Unlimited Messaging REST API: you call typed Python methods instead of building HTTP requests by hand.

Also called the Python WhatsApp library or Python client - the unlimited-messaging package published on PyPI.

[Source: unlimited-messaging on PyPI↗](https://pypi.org/project/unlimited-messaging)

Comparison

## Meta's official API in Python vs Unlimited Messaging Python SDK

The same goal - sending a WhatsApp message from Python - via two very different paths. On the left, Meta's official WhatsApp Business API called over raw HTTP with requests. On the right, Unlimited Messaging's Python SDK. Line by line, what each approach requires.

__Meta's official API in Python vs Unlimited Messaging Python SDK__
| Meta's official API in Pythonraw HTTP with requests | Unlimited Messaging Python SDKpip install, typed client |                                   |
| --------------------------------------------------- | ------------------------------------------------------- | --------------------------------- |
| Installation                                        | requests + HTTP code to write                           | pip install unlimited-messaging   |
| Business account required                           | Verified Meta Business account                          | Your regular WhatsApp account     |
| Templates to approve                                | Meta approval required                                  | None, free text                   |
| Lines to send                                       | \~20 (URL, headers, JSON, errors)                       | 3 lines of Python                 |
| Media                                               | Upload + media\_id in two steps                         | One URL passed to the method      |
| Webhooks                                            | To receive and verify yourself                          | Typed JSON payloads, ready to use |
| Pricing                                             | Per template message, variable                          | Fixed monthly price               |
| Unlimited                                           | No - billed per message                                 | Yes, unlimited messages           |

Our approach

## A Python SDK that fits in three lines

We keep the rigor of a real API - typed client, explicit errors, webhooks - and remove all the Meta friction. You write Python, not HTTP plumbing.

### pip install, then you send

One pip command and the client is available. Instantiate \`UnlimitedMessagingApi(token=...)\`, call \`client.messages.message\_send()\`, your WhatsApp message goes out. No Meta SDK to wire up, no business onboarding.

1. 01  
### Typed methods, no HTTP  
The SDK exposes Python methods with autocompletion and typed errors. You no longer build URLs or headers: the client handles authentication, serialization and retries.
2. 02  
### Media and webhooks included  
Send images, PDFs and videos via a simple URL. Receive delivered / read / reply statuses as JSON webhooks, without verifying anything by hand.
3. 03  
### Unlimited, your regular account  
Messages go out from your usual WhatsApp account, unlimited, at a fixed price. No templates to approve, no per-message billing.

Lines to send a WhatsApp

3Lines to send a WhatsApp

pip command to install

1pip command to install

Supported Python versions

3.8+Supported Python versions

From key to first message

5 minFrom key to first message

How it works

## Send a WhatsApp in Python in three steps

1. 01  
### Install the package  
Run \`pip install unlimited-messaging\` in your project, your venv or your notebook. The client is ready to import.
2. 02  
### Authenticate with an API key  
Generate a key in your dashboard (Settings → API Keys), then pass it to the client: \`UnlimitedMessagingApi(token="um\_live\_…")\`.
3. 03  
### Call client.messages.message\_send()  
Specify the recipient and the text. For media, add a URL; for tracking, plug in your webhooks. That's it.

Key takeaway

### If you write Python, you don't need Meta's official API.

For scripts, a Django or FastAPI backend, or a notebook that needs to notify over WhatsApp, the Python SDK saves you the business onboarding, the templates and the per-message billing. pip install, an API key, \`client.messages.message\_send()\`: your messages go out from your regular account, unlimited.

FAQ

## Questions about the Python WhatsApp SDK

Install the SDK with \`pip install unlimited-messaging\`, create a client with your API key, then call \`client.messages.message\_send(recipient="+1…", text="…")\`. Three lines are enough - the SDK handles authentication and sending for you.

No. The Python SDK relies on your regular WhatsApp account. No Meta Business account to verify, no templates to get approved, no per-message billing.

Yes. You send images, PDFs and videos via a simple URL, and you receive delivered / read / reply statuses as typed JSON webhooks, ready to process in Python.

Yes. It's a standard Python package installed via pip: it works in any script, in a Django or FastAPI backend, in a Celery task as well as in a Jupyter notebook.

Python 3.8 and above. The client is synchronous today; an async variant is in the works.

Yes, the code is published on GitHub under the MIT license, and the package is distributed on PyPI under the name unlimited-messaging.

Sources

## Sources & references

To check the information in this article for yourself:

1. [01unlimited-messaging - package page↗PyPI](https://pypi.org/project/unlimited-messaging)
2. [02Requests - HTTP for Humans (documentation)↗Python Requests](https://requests.readthedocs.io/)
3. [03WhatsApp Cloud API - official documentation↗Meta for Developers](https://developers.facebook.com/docs/whatsapp/cloud-api)
4. [04WhatsApp Business - official overview↗WhatsApp](https://www.whatsapp.com/business)

![Ilian, senior software engineer](https://ilianazz.com/images/iliazz.png)

Written by

[Ilian](https://unlimitedmessaging.app/authors/ilian) · Senior Software Engineer

A senior software engineer, he founds and runs several tech companies. He builds products around messaging APIs, automation and AI integration, and shares here what he learns while building.

[View LinkedIn profile↗](https://www.linkedin.com/in/ilianAzz/)Updated November 6, 2026

![](https://unlimitedmessaging.app/assets/logos/whatsapp.svg)![](https://unlimitedmessaging.app/assets/logos/email.svg)![](https://unlimitedmessaging.app/assets/logos/sms.svg)

## Ready to send WhatsApp messages from Python?

Create your account, generate an API key, run \`pip install unlimited-messaging\` and send your first message today.

[Get my API key→](https://app.unlimitedmessaging.app)

Similar articles
* [![](https://unlimitedmessaging.app/_next/image?url=%2Fassets%2Farticles%2Fcovers%2Ftypescript-sdk-en.png&w=3840&q=75)Send WhatsApp from Node.js with a fully typed SDKFully typed npm package for Node.js, Next.js, and any JS environment.](https://unlimitedmessaging.app/articles/typescript-sdk)
* [![](https://unlimitedmessaging.app/_next/image?url=%2Fassets%2Farticles%2Fcovers%2Fwhatsapp-api-en.png&w=3840&q=75)WhatsApp REST API: your first message from code, step by stepProgrammatic WhatsApp messaging via a simple REST API.](https://unlimitedmessaging.app/articles/whatsapp-api)
* [![](https://unlimitedmessaging.app/_next/image?url=%2Fassets%2Farticles%2Fcovers%2Fmcp-en.png&w=3840&q=75)What is a WhatsApp MCP server? The 2026 guideConnect any MCP-compatible AI assistant to WhatsApp via OAuth 2.0.](https://unlimitedmessaging.app/articles/mcp)
