A Telnyx API v2 key lets whoever holds it call the Telnyx API as your account: send SMS, place and control calls, order or release phone numbers, and read usage and configuration. Everything is billed to you, and the typical abuse is toll fraud or SMS pumping to premium-rate destinations. Control over your numbers also lets an attacker redirect calls or intercept one-time codes sent by SMS. Delete the key first, then read the logs.
Check your GitHub account for leaked secrets — free
- Provider
- Telnyx
- Severity
- High
- Impact
- SaaS account access and billing
- Checked live by LeakWatch
- No
What a Telnyx API key looks like
A Telnyx v2 key starts with KEY in capitals, followed by 55 characters from letters, digits, dashes and underscores, 58 in total:
KEYXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Telnyx API v2 key (masked, KEY + 55 characters)
It is sent as a Bearer token in the Authorization header of requests to the Telnyx v2 API. The portal does not show the full key again after creation, so a key found in a file was copied at that moment. Typical variable names are TELNYX_API_KEY and TELNYX_API_V2_KEY. Telnyx also has other secrets that look different, such as AI gateway token keys, which have their own prefix and are not covered by this rule. Webhook signing public keys are separate too and are not credentials.
How Telnyx API keys get leaked
- SDK examples. A client initialised with the key typed in for a first test, then committed.
- Environment files.
TELNYX_API_KEYin a.envor compose file that lands in a repository. - Voice and messaging backends. Call-control and SMS services keep the key next to webhook URLs in a config shared with contractors.
- Mobile and frontend code. A key placed in an app or script so it can start a call or send a code directly.
- CI logs and tickets. A
curlcommand with the Bearer header pasted into a support thread or printed by a debug step.
What to do in the first hour
- Open the API keys page in the Telnyx portal (see the link below), in the authentication section, and find the exposed key by its name or last characters.
- Create a new key and deploy it to your application or secret store. Make one test request.
- Delete or disable the exposed key from the same page. Retry a request with the old value to confirm it is rejected.
- Check usage and balance. Compare spend with what you expected and set a low balance alert. Read the detail records for messages and calls since the exposure: destinations you never serve, premium-rate numbers, long calls, bursts at odd hours.
- Review account objects. Check phone numbers, messaging profiles, connections, call control applications and webhooks for anything you did not create. A webhook pointing to a URL you do not own would send events to the attacker.
- Check numbers and ports. Confirm that no number was ordered, released or ported out. Watch for forwarding rules you did not set.
- Clean up the code and rotate neighbouring secrets. See I accidentally pushed an API key to GitHub.
Not sure what else leaked from the same repository? Run a free scan.
Revoke it at Telnyx
Telnyx documentation says keys can be deleted from the API keys page of the Telnyx portal, after you sign in, and also mentions disabling a key from the authentication page. The full key cannot be retrieved after creation. A person has not confirmed the exact menu wording for this guide, and the portal can change. Look for the section where API keys are created and listed, and use the delete or disable option. Telnyx recommends generating new keys regularly and deactivating old ones, which is a good habit.
How LeakWatch detects it
The rule is called Telnyx API Key. It looks for the word telnyx (any case), then up to 40 characters, then the capital letters KEY followed by exactly 55 letters, digits, dashes or underscores, with word boundaries on both sides. The telnyx context is required, so a key alone in a file with no vendor name close to it is not reported. A string of another length is also ignored. The severity is high.
This type is not checked live: LeakWatch has no validator for Telnyx keys, so a finding means the pattern was seen, not that the key still works.
LeakWatch detects this format but does not check it live: it can tell you the key is exposed, not whether it still works. Assume it does until you have revoked it.
FAQ
Can a leaked key redirect my calls or texts?
If its owner can manage numbers and connections, yes. Review number settings, forwarding and webhooks as soon as the key is deleted.
Should I disable the key or delete it?
For a leak, delete it. Disabling can be undone, and a key that was exposed should not come back into use.
Is a test environment key safe to leave exposed?
Not if it belongs to a real account. Any key tied to a funded account can send traffic, so delete it and create a new one.