Skip to main content

Vonage JWT Generator for Python

This package (vonage-jwt) provides functionality to generate a JWT in Python code.

It is used by the Vonage Python SDK, specifically by the vonage-http-client package, to generate JWTs for authentication. Thus, it doesn't require manual installation or configuration unless you're using this package independently of an SDK.

For full API documentation, refer to the Vonage developer documentation.

Installation

Install from the Python Package Index with pip:

pip install vonage-jwt

Generating JWTs

This JWT Generator can be used implicitly, just by using the Vonage Python SDK to make JWT-authenticated API calls.

It can also be used as a standalone JWT generator for use with Vonage APIs, like so:

Import the JwtClient object

from vonage_jwt import JwtClient

Create a JwtClient object

jwt_client = JwtClient(application_id, private_key)

Generate a JWT using the provided application id and private key

jwt_client.generate_application_jwt()

Optional JWT claims can be provided in a python dictionary:

claims = {'jti': 'asdfzxcv1234', 'nbf': now + 100}
jwt_client.generate_application_jwt(claims)

Verifying a JWT signature

You can use the verify_jwt.verify_signature method to verify a JWT signature is valid.

from vonage_jwt import verify_signature

verify_signature(TOKEN, SIGNATURE_SECRET) # Returns a boolean

Metadata

Release files for vonage-jwt 1.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vonage-jwt 1.1.5
File Size Uploaded Provenance
vonage_jwt-1.1.5.tar.gz 3.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for vonage-jwt 1.1.5
File Interpreter ABI Platform
vonage_jwt-1.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 8.1 kB

Release files / vonage_jwt-1.1.5.tar.gz

Download URL vonage_jwt-1.1.5.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
92dee47aa18092efc8c158f89cbe01ffaf7a976eef717c57b23e01c5491c795d
BLAKE2b-256 checksum
How to use checksums
9c9c62682530eb7f576fc8675bd7cd5e2411d33280f1cc25bcdf05ee3f82b3e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.4

Release files / vonage_jwt-1.1.5-py3-none-any.whl

Download URL vonage_jwt-1.1.5-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2dea812ff271a75d495b703a1a27dcb7e457233f6237c2ad92cb815650004a7
BLAKE2b-256 checksum
How to use checksums
6a44be3af1d7333061fb15fd677305a50409f43714e74a67e7c59cf4a2811237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.4

Security for vonage-jwt 1.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page