Install & Compatibility
Where this runs
tested against v1.1.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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 2.167s · 50MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 5.3s · import 1.988s · 50MB
49MB installed
● package 49MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Account
✓ from vonage_account import Account
✗ from vonage import Vonage
Balance
✓ from vonage_account import Balance
✗ from vonage import Auth
VonageApiSecret
✓ from vonage_account import VonageApiSecret
✗ from vonage import Auth
This quickstart demonstrates how to initialize the Vonage client using API key and secret (preferably from environment variables) and then retrieve the current account balance and top-up status using the `client.account` interface.
import os
from vonage import Vonage, Auth
# Initialize Vonage client using API key and secret from environment variables
# VONAGE_API_KEY and VONAGE_API_SECRET
client = Vonage(
auth=Auth(
api_key=os.environ.get('VONAGE_API_KEY', 'YOUR_API_KEY'),
api_secret=os.environ.get('VONAGE_API_SECRET', 'YOUR_API_SECRET')
)
)
try:
# Retrieve account balance
balance_response = client.account.get_balance()
print(f"Account Balance: {balance_response['value']} {balance_response['unit']}")
# Get account top-up status (example of another account method)
topup_response = client.account.get_topup()
print(f"Account Auto Top-up: {'Enabled' if topup_response.get('auto_topup') else 'Disabled'}")
except Exception as e:
print(f"An error occurred: {e}")
print("Please ensure VONAGE_API_KEY and VONAGE_API_SECRET are correctly set and have permissions.")
Debug
Known issues
breakingThe Vonage Python SDK transitioned from `nexmo` to `vonage` as the top-level package and client name. Older code relying on `import nexmo` or `nexmo.Client` will raise `ModuleNotFoundError` or other API incompatibilities with current SDK versions.fixUpdate imports from `nexmo` to `vonage` (e.g., `import vonage` instead of `import nexmo`). Re-initialize the client using `vonage.Vonage` instead of `nexmo.Client`. Review migration guides for full API changes if upgrading from very old versions.
affects: <4.0.0
gotchaThe Vonage Python SDK is a monorepo. While `vonage-account` is a separate PyPI package, its functionalities are typically accessed through the unified `vonage.Vonage` client instance (e.g., `client.account.get_balance()`). Directly importing and instantiating classes from `vonage_account` might bypass the central configuration and authentication setup of the main SDK, leading to unexpected behavior or missing features.fixAlways install the main `vonage` package and use `from vonage import Vonage, Auth` to create your client. Access Account API methods via the `client.account` property.
affects: All versions
deprecatedSome APIs that were historically grouped under 'account' or 'pricing' in other SDKs (e.g., Java) have been removed or moved in newer SDK versions. Always consult the specific Python SDK documentation for the latest API availability.fixRefer to the official Vonage Python SDK documentation for the current structure and availability of specific API methods. Use modern authentication patterns (API Key/Secret or Application ID/Private Key) based on the API endpoint.
affects: Varies by API, potentially SDK versions 4.x.x+
Upgrade
Version history
1.1.2latest on PyPI · released Apr 22, 2026
Audit
Dependencies
vonagerequiredThe `vonage-account` package is typically used as part of the main `vonage` SDK, which handles client instantiation and authentication. Installing `vonage` automatically pulls in `vonage-account` and other API-specific sub-packages.