Merged
Conversation
Add ED25519 webhook verification to match Go, Java, and Ruby SDKs.
The generated webhooks.py uses standardwebhooks (HMAC-SHA256), but
Telnyx webhooks use ED25519 signatures with:
- Header: telnyx-signature-ed25519 (base64-encoded 64-byte signature)
- Header: telnyx-timestamp (Unix timestamp in seconds)
- Signed payload: "{timestamp}|{payload}"
New files in lib/ (preserved across Stainless codegen):
- webhook_verification.py: Core ED25519 verification logic
- webhooks_ed25519.py: Higher-level helpers (verify_ed25519, unwrap_with_ed25519)
Usage:
from telnyx.lib import verify_ed25519, unwrap_with_ed25519, WebhookVerificationError
# Verify only
verify_ed25519(client, payload, headers)
# Verify and parse
event = unwrap_with_ed25519(client, payload, headers)
Requires PyNaCl (optional dependency) for ED25519 cryptography.
…ication feat(lib): add ED25519 webhook signature verification
Contributor
Author
|
🧪 Testing To try out this version of the SDK: Expires at: Thu, 30 Apr 2026 09:46:40 GMT |
Contributor
Author
|
🤖 Release is at https://github.com/team-telnyx/telnyx-python/releases/tag/v4.90.0 🌻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated Release PR
4.90.0 (2026-03-31)
Full Changelog: v4.89.0...v4.90.0
Features
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions