Registry / http-networking / vonage-http-client

vonage-http-client

JSON →
library1.5.2pypypi✓ verified 84d ago

The `vonage-http-client` is a foundational Python HTTP client library for interacting with Vonage APIs. It provides low-level request building and authentication mechanisms, supporting API key/secret and JWT-based authentication. While primarily an internal dependency of the higher-level `vonage` Python SDK, it can be used directly for specific API interactions. The current version is 1.5.1, and it has a relatively stable release cadence, with updates typically coinciding with major SDK changes or specific HTTP client enhancements.

pip install vonage-http-client
INSTALL
IMPORT
SIG · VONAGE-HTTP-CLIENT
V
vonage-http-client
http-networkingpythonv1.5.2
Install
4.7s avg
Import
Disk
46MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.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.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 48MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 4.7s · import 0.000s · 48MB
46MB installed
● package 46MB
Code
Verified usage

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

HttpClient
from vonage_http_client import HttpClient
from vonage_http_client import Client
Auth
from vonage_http_client import Auth
HttpClientOptions
from vonage_http_client import HttpClientOptions

This quickstart demonstrates how to instantiate the `vonage-http-client` with API key/secret and make a basic GET request to a Vonage API endpoint. Remember to set `VONAGE_API_KEY` and `VONAGE_API_SECRET` environment variables. For more complex interactions, the full `vonage` Python SDK is generally preferred as it handles endpoint paths and response parsing automatically.

import os from vonage_http_client import Client from vonage_http_client.exceptions import VonageServerException # NOTE: For most users, the higher-level 'vonage' SDK (pip install vonage) # is recommended for easier API interaction. # Retrieve API key and secret from environment variables API_KEY = os.environ.get('VONAGE_API_KEY', '') API_SECRET = os.environ.get('VONAGE_API_SECRET', '') if not API_KEY or not API_SECRET: print("Warning: Please set VONAGE_API_KEY and VONAGE_API_SECRET environment variables.") print("Skipping quickstart as authentication is required.") else: try: # Instantiate the HTTP client with your Vonage API credentials client = Client( api_key=API_KEY, api_secret=API_SECRET, # For demonstration, using a common Vonage API base URL. # Specific API paths (e.g., /account/balance) need to be appended manually. base_url="https://api.nexmo.com" ) # Example: Make a GET request to a Vonage API endpoint. # This will likely require valid credentials and specific endpoint access. # A common endpoint is '/account/balance'. print("Attempting to fetch account balance...") response = client.get('/account/balance') print(f"Status Code: {response.status_code}") print(f"Response Body: {response.json()}") except VonageServerException as e: print(f"Vonage API error: {e.status_code} - {e.reason} - {e.error_response}") except Exception as e: print(f"An unexpected error occurred: {e}")
Debug
Known issues
gotchaUsers often mistake `vonage-http-client` for the primary Vonage Python SDK. While it provides low-level access, the `vonage` package (`pip install vonage`) offers a much richer, higher-level interface to Vonage APIs, handling endpoint specifics, data serialization, and common use cases.
fix
For most application development, use `pip install vonage` and import from `vonage` instead of `vonage_http_client`.
affects: All versions
gotchaWhen using `vonage-http-client` directly, you are responsible for constructing the full API endpoint path (e.g., `/account/balance` for `https://api.nexmo.com/account/balance`) and managing request body/query parameters manually, unlike the higher-level SDK which abstracts these details.
fix
Refer to the specific Vonage API documentation for the exact paths and parameters required for each endpoint. Alternatively, use the `vonage` SDK for simplified API calls.
affects: All versions
gotchaAuthentication failures (e.g., HTTP 401 Unauthorized) are common when using the client directly if API key/secret or JWT details are incorrect, expired, or if the API key lacks necessary permissions for the requested endpoint.
fix
Double-check your API key and secret, ensure they are active in your Vonage account, and verify that the associated API key has the required permissions for the API endpoint you are calling.
affects: All versions
Upgrade
Version history
1.5.2latest on PyPI · released Apr 22, 2026
Audit
Dependencies
requestsrequiredUsed for making HTTP requests.
pyjwtrequiredUsed for JWT-based authentication.
cryptographyrequiredProvides cryptographic primitives for JWT signing.
Agent activity
29 hits · last 30 days
node
24
OpenAI (training)
1
Resources
vonage-http-client — pip install vonage-http-client · libregistry