Skip to content
Messaging · Secret guide

Leaked MessageBird API Key: what to do in the first hour

High severityDetected onlyLast verified · 4 min read

A MessageBird access key lets whoever holds it call the MessageBird API on your account. A live key sends real messages and deducts their cost from your balance, so the first danger is money: SMS pumping to premium-rate numbers can drain a balance quickly. The second is impersonation, since messages go out under your sender names. Depending on the account, the key may also read message history and contacts. MessageBird is now part of Bird, and the documentation describes the same access keys. Revoke first, then investigate.

Check your GitHub account for leaked secrets — free

Provider
Messagebird
Severity
High
Impact
SaaS account access and billing
Checked live by LeakWatch
No

What a MessageBird API key looks like

MessageBird access keys are 25-character strings of letters and digits. Live keys carry no prefix; test keys begin with test_:

XXXXXXXXXXXXXXXXXXXXXXXXX        live access key (masked, 25 letters and digits)
test_XXXXXXXXXXXXXXXXXXXXXXXXX   test access key (masked)

A test key checks that a request is well formed without sending messages or spending credits, so a leaked test key is much less serious than a live one. The key is sent in an Authorization: AccessKey ... header. Typical names are MESSAGEBIRD_API_KEY and MESSAGEBIRD_ACCESS_KEY. Because live keys have no prefix, the surrounding variable name is what identifies them.

How MessageBird API keys get leaked

  • SDK examples copied into code. The quick-start snippet with the key typed in and committed.
  • Environment files. MESSAGEBIRD_API_KEY in a .env or compose file that lands in a repository.
  • Mobile and frontend code. A key placed in an app or web bundle to send a verification SMS directly, where anyone can extract it.
  • Two-factor and notification services. Backend projects that send one-time codes, where the key sits in a config file shared with contractors.
  • CI logs and tickets. A request or curl command pasted with the Authorization header in a support thread.

What to do in the first hour

  1. Open the access keys page of the MessageBird dashboard (see the link below), in the developers section, and find the exposed key.
  2. Create a new key and deploy it to your application or secret store. Send one test message.
  3. Delete the exposed key and retry a request with the old value to confirm it is rejected.
  4. Check your balance and usage. Compare the current balance with what you expected, and set a low balance alert or auto top-up limit if the account supports it.
  5. Read the message logs. Look for messages you did not send, unusual destination countries, premium-rate numbers, or bursts at odd hours. Fraud usually shows as many short messages to similar numbers.
  6. Review other objects. Check sender names, numbers, webhooks and contacts for anything you did not add.
  7. Clean up the code and rotate other secrets in the same file. See I accidentally pushed an API key to GitHub.

Not sure what else leaked from the same repository? Run a free scan.

Not sure what else leaked? Run a free scan.

Revoke it at MessageBird

MessageBird’s documentation says access keys are created and managed in the developers section of your MessageBird dashboard, on the tab for API access, after you sign in. Keys cannot be created through the API, only in the dashboard. A person has not confirmed the exact menu wording for this guide, and the product is being merged into Bird, so the navigation may differ. Look for the list of access keys and the option to remove one, and follow the current documentation at docs.bird.com.

How LeakWatch detects it

The rule is called Messagebird API Token. It needs the word messagebird, message-bird or message_bird (any case), then an assignment sign such as =, :, := or =>, optionally followed by quotes, and then exactly 25 letters and digits that must end at a quote, whitespace, a semicolon or the end of the line. So a key sitting alone in a file, or one assigned to a variable without MessageBird in its name, is not reported. A test_ key is not matched as such. The severity is high.

This type is not checked live: LeakWatch has no validator for MessageBird 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

How do I tell a test key from a live one?

Test keys start with test_ and send nothing. Live keys have no prefix and cost money. If you cannot tell, treat the key as live and revoke it.

Can a stolen key drain my balance?

Yes, if it is a live key. Check the balance and message logs now, and contact MessageBird support if you see traffic you did not send.

Does MessageBird still exist after the move to Bird?

The product continues under Bird and the documentation redirects there. Your existing keys keep their format, but menu names may differ from older guides.

Get alerted next time a secret leaks — create a free account

LeakWatch is not affiliated with Messagebird.