Registry / communication / vonage-messages

vonage-messages

JSON →
library1.7.1pypypi✓ verified 84d ago

The `vonage-messages` library is an extension for the main `vonage` Python SDK, providing access to the Vonage Messages API for sending SMS, MMS, and WhatsApp messages. It is currently at version 1.6.2 and is actively maintained with regular updates.

pip install vonage-messages
INSTALL
IMPORT
SIG · VONAGE-MESSAGES
V
vonage-messages
communicationpythonv1.7.1
Install
5.2s avg
Import
Disk
49MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.7.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 50MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 5.2s · import 0.000s · 50MB
49MB installed
● package 49MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Messages
from vonage_messages import Messages
from vonage import Client

This quickstart demonstrates sending an SMS message using the Vonage Messages API. It initializes the `vonage.Client` (which is extended by `vonage-messages`) and then uses the `client.messages.send` method. Remember to replace placeholder numbers and either set API key/secret as environment variables or directly in the code.

import os from vonage import Client VONAGE_API_KEY = os.environ.get('VONAGE_API_KEY', 'YOUR_API_KEY') VONAGE_API_SECRET = os.environ.get('VONAGE_API_SECRET', 'YOUR_API_SECRET') if not VONAGE_API_KEY or not VONAGE_API_SECRET: print("Please set VONAGE_API_KEY and VONAGE_API_SECRET environment variables or replace placeholders.") else: client = Client(key=VONAGE_API_KEY, secret=VONAGE_API_SECRET) try: response_data = client.messages.send( { "channel": "sms", "to": "YOUR_RECIPIENT_NUMBER", # e.g., "447900000000" "from": "VONAGE_NUMBER", # Your Vonage virtual number "text": "Hello from Vonage Python SDK!" } ) if response_data["messages"][0]["status"] == "0": print("Message sent successfully.") else: print(f"Message failed with error: {response_data['messages'][0]['error_text']}") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
gotchaThe `vonage-messages` package is an extension and requires the core `vonage` package to be installed alongside it. Without `vonage`, you will encounter import errors or `AttributeError`.
fix
Ensure both `pip install vonage` and `pip install vonage-messages` are executed in your environment.
affects: >=1.0.0
breakingThis library is designed for the modern Vonage Messages API, which handles SMS, MMS, and WhatsApp via a unified endpoint. It does not directly support the older, legacy Vonage (formerly Nexmo) SMS API. If you need the legacy SMS API, refer to the `vonage.Sms` client.
fix
Review the Vonage API documentation to determine if you need the Messages API or the legacy SMS API. For the Messages API, use `client.messages.send()`. For legacy SMS, use `client.sms.send_message()`.
affects: All versions
breakingUsers migrating from the deprecated `nexmo-python` SDK to `vonage-python-sdk` will encounter significant breaking changes, including package renames (`nexmo` to `vonage`), module paths, and method signatures.
fix
Thoroughly review the official Vonage Python SDK migration guide. Update all imports from `nexmo` to `vonage` and adapt API calls to the new `vonage.Client` structure, especially for authentication and message sending.
affects: All versions (relative to `nexmo-python`)
gotchaFor convenience, the `vonage.Client` can automatically pick up `VONAGE_API_KEY` and `VONAGE_API_SECRET` from environment variables. If you pass empty strings or incorrect values, authentication will fail silently until an API call is made.
fix
Always verify your `VONAGE_API_KEY` and `VONAGE_API_SECRET` are correctly set as environment variables or explicitly passed to the `Client` constructor with valid credentials. Handle potential `VonageError` exceptions.
affects: All versions
Upgrade
Version history
1.7.1latest on PyPI · released May 29, 2026
Audit
Dependencies
vonagerequiredThe `vonage-messages` library extends the core `vonage.Client` object, so the main `vonage` SDK is a mandatory runtime dependency.
Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
vonage-messages — pip install vonage-messages · libregistry