Registry / communication / vonage

vonage

JSON →
library4.8.2pypypi✓ verified 30d ago

The `vonage` Python SDK (currently v4.x.x) provides a streamlined interface to interact with various Vonage APIs, including the Application API. Vonage Applications are a core concept for configuring security and capabilities (like Voice, Messages, RTC) for your Vonage services. This SDK is actively maintained with a regular release cadence, with version 4.x.x being a significant rewrite of previous major versions. While a `vonage-application` PyPI package exists (v2.0.1), the recommended and actively supported way to manage Vonage Applications programmatically in Python is through the main `vonage` SDK.

pip install vonage
INSTALL
IMPORT
SIG · VONAGE
V
vonage
communicationpythonv4.8.2
Install
6.9s avg
Import
1687ms
Disk
51MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v4.8.2 · 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.10–3.910 runs
installs and imports cleanly · install 0.0s · import 1.752s · 52.5MB
glibc
py 3.10–3.910 runs
installs and imports cleanly · install 6.9s · import 1.622s · 52MB
51MB installed
● package 51MB
Code
Verified usage

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

Vonage
✓ from vonage import Vonage, Auth
✗ import vonage client = vonage.Client(key=api_key, secret=api_secret)
As of v4.0.0, the primary client class is `Vonage` and `Auth` is used for credentials, replacing the old `vonage.Client`.
ApplicationConfig
✓ from vonage_application import ApplicationConfig
Data models like ApplicationConfig are now imported from their specific API sub-packages within the monorepo structure introduced in v4.x.x.
Application
✓ vonage_client.application
✗ vonage_client.Application
In v4.x.x, API functionalities are accessed via lowercase attributes on the `Vonage` client instance (e.g., `client.application`), not directly as capitalized classes on the client.

This quickstart demonstrates how to initialize the Vonage client using API key and secret, then create a new Vonage Application with voice capabilities, and finally list all existing applications. It uses the `vonage` SDK (v4.x.x) which is the current recommended approach for interacting with the Application API. Ensure `VONAGE_API_KEY` and `VONAGE_API_SECRET` environment variables are set or replaced.

import os from vonage import Vonage, Auth from vonage_application import ApplicationConfig VONAGE_API_KEY = os.environ.get('VONAGE_API_KEY', 'YOUR_API_KEY') VONAGE_API_SECRET = os.environ.get('VONAGE_API_SECRET', 'YOUR_API_SECRET') # Initialize Vonage client with API key and secret auth = Auth(api_key=VONAGE_API_KEY, api_secret=VONAGE_API_SECRET) vonage_client = Vonage(auth=auth) # Create a new Vonage Application try: application_data = vonage_client.application.create_application( ApplicationConfig(name='MyTestPythonApp', capabilities={'voice': {'webhooks': {'answer_url': {'address': 'https://example.com/answer', 'http_method': 'GET'}}}}) # Example with voice capability ) print(f"Application created successfully: {application_data.name} (ID: {application_data.id})") # List applications (demonstrates another API call) applications = vonage_client.application.list_applications() print("\nAll Applications:") for app in applications.embedded.applications: print(f"- {app.name} (ID: {app.id})") except Exception as e: print(f"Error creating or listing application: {e}")
Debug
Known issues
breakingVonage Python SDK v4.x.x is a complete rewrite of v3.x.x. The main client class changed from `vonage.Client` to `vonage.Vonage`, and API methods are now accessed via attributes (e.g., `client.application.create_application()` instead of `client.create_application()`). Data models are now Pydantic-based and imported from specific sub-packages (e.g., `vonage_application.ApplicationConfig`).
fix
Refer to the official v3 to v4 migration guide. Update client initialization, method calls, and data model imports. For example, `client = vonage.Vonage(auth=Auth(api_key=..., api_secret=...))` and `from vonage_application import ApplicationConfig`.
affects: v3.x.x to v4.x.x
gotchaConfusing 'vonage-application' PyPI package with the main SDK. The `vonage-application` package (v2.0.1) is likely an older or highly specialized component, and the primary way to manage Vonage Applications is through the comprehensive `vonage` Python SDK (v4.x.x).
fix
Always install and use the `vonage` package (e.g., `pip install vonage`) for general Vonage API interactions, including application management. Consult the official Vonage Developer documentation for Python SDK usage, which focuses on the `vonage` package.
affects: All versions
gotchaAuthentication for certain APIs (like Voice) requires an Application ID and its private key, not just API Key and Secret. Mixing these can lead to authentication errors.
fix
When creating the `Auth` object for `vonage.Vonage`, use `Auth(application_id='your_app_id', private_key='path/to/private.key')` for application-specific APIs requiring JWT authentication. Ensure the private key file exists and the path is correct.
affects: All versions
Errors
Common errors & fixes
AttributeError: 'Client' object has no attribute 'application'
Attempting to use v4.x.x application API methods on a v3.x.x `vonage.Client` instance or trying to access the application functionality incorrectly in v4.
fix
Ensure you are using `vonage.Vonage` for v4.x.x, and access application methods via `vonage_client.application.method_name()`. If on v3, the methods were often directly on the client (e.g., `client.create_application()`), but upgrading to v4 is recommended.
ModuleNotFoundError: No module named 'vonage_application'
Attempting to import data models from `vonage_application` but the main `vonage` SDK (v4.x.x) or its sub-packages are not correctly installed or accessible.
fix
Ensure `pip install vonage` has been run. The `vonage` package in v4 is a monorepo that includes `vonage_application` as a dependency. If running in an isolated environment, verify the virtual environment is activated and dependencies are correctly installed. Also, check for typos in the import path.
Error: Invalid credentials for API request
Incorrect API Key/Secret or Application ID/Private Key provided, or using the wrong authentication type for the specific API endpoint being called.
fix
Verify `VONAGE_API_KEY` and `VONAGE_API_SECRET` are correct from your Vonage Dashboard. If using application-based authentication (e.g., for Voice), ensure `VONAGE_APPLICATION_ID` and the path to `VONAGE_PRIVATE_KEY` are correct, and use the `Auth` object appropriately for JWT authentication.
Upgrade
Version history
4.8.2latest on PyPI · released Jul 20, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
38 hits · last 30 days
node
32
OpenAI (training)
1
Resources
vonage — pip install vonage · libregistry