Academy
7 ways to share an API key with your team
API keys get pasted into chat because it is quick, and then they stay there. A key in a channel is a key that anyone with access to the channel can read, today and next year. This list gives you seven ways to share an API key, in our order from best to worst, with what each one costs and when it fits. It uses the OWASP guidance on secrets and fresh leak data from GitGuardian's 2026 report, and it ends with the step that matters most: rotating the key afterwards.
Published · 6 min read
Key takeaways
- The best way to share an API key is to not share it. Give each person or tool its own.
- For one-off handovers, a link that burns after one view beats chat, email and tickets.
- Keys that go through people should be rotated afterwards, because leaked keys often stay valid for years.
- Give every key the smallest permissions that let the job work.
Why this list exists
Developers rarely mean to leak keys. They paste one into a team chat so a colleague can unblock themselves, and carry on. GitGuardian's State of Secrets Sprawl 2026 report counted about 28.65 million new hardcoded secrets added to public GitHub commits in 2025, up 34% on the year before, and found that more than 64% of credentials confirmed valid in 2022 were still valid when it retested in January 2026 (GitGuardian). Keys do not expire on their own. Once one leaks, it works until a person revokes it.
Here are seven ways to share an API key, in the order we would reach for them.
1. Give everyone their own key
If the provider lets you create several keys, make one per person or per tool, and name each one. When someone leaves, you revoke theirs and nobody else is affected. When something odd shows up in the provider's logs, you know whose key did it. This is the single best habit for api key management, and it removes the need to share at all.
2. Use a secrets manager for anything that runs
If the key is for a server, job or pipeline, no person should handle it. Store it in a secrets manager or in your deployment platform's secret settings, and let the app read it at run time. OWASP's Secrets Management Cheat Sheet is clear that secrets should not be embedded in source code or configuration files, and that environment variables are a last resort because they can end up in logs (OWASP).
3. A shared vault in your password manager
For keys a team uses by hand, such as an admin key for a dashboard, a shared vault in a password manager works well. Access is per person, it can be removed, and there is one copy. The cost is that everyone needs an account.
4. A link that burns after one view
For a one-off handover to a contractor or a colleague without a vault, use a one-time link. Paste the key into the link creator, set 1 view and a short time, send the link, and nothing sits in your chat history. Add a passphrase and tell it by phone if the key is powerful. This is how to share an API key securely when the other person has no account on your tools.
5. A request link, when you are the one who needs the key
Sometimes the key is held by someone else, such as a client who owns the account. Rather than asking them to email it, send a request link that asks for exactly one thing and explains why. They paste it into a form and it lands encrypted in your vault. Our post on sharing passwords with clients covers the wording.
6. Read it out, or type it in together
On a screen share or a call, you can read a short token aloud. It leaves no copy, but long random keys are easy to mishear, and it is no use across time zones. Keep this for small tokens.
7. Chat, email, tickets, wikis and Git: do not
This is the "do not" pile. Each one stores the key in plain text, searchable, backed up and often visible to more people than you intended. Git is the worst, because history keeps the key even after you delete the line.
The seven side by side
| Way | Who handles the key? | Leaves a copy? | Best for | Cost |
|---|---|---|---|---|
| Own key per person | Each person | In their own settings | Everyday access | Provider must support it |
| Secrets manager | Nobody, the app reads it | In the manager, by design | Servers, jobs, CI | Setup time |
| Shared vault | Team members | In the vault | Team admin keys | Everyone needs an account |
| Burning link | Sender and recipient | No | One-off handovers | Link must reach the right person |
| Request link | Owner, then you | In your vault | Keys held by clients | Needs a free account |
| Read aloud | Both people | No | Short tokens | Mishearing |
| Chat, email, Git | Everyone with access | Yes, for years | Nothing | Leaks |
A worked example
This is an illustrative scenario. A four-person agency, Northgate, wants a freelance developer to connect their email-sending service to a client's website. The developer needs the sending key for two days.
Northgate's lead first looks for a better route. The email service allows several keys, so she creates a new one named "freelancer-nov", with permission to send only. She does not hand over the full admin key.
She pastes the new key into a burning link set to one view and 48 hours, adds a passphrase, and sends the link. She phones the passphrase. The developer reveals the key, puts it into the site's deployment settings, and never pastes it anywhere else.
At the end of the week she deletes "freelancer-nov" in the email service. Because the key was separate and narrow, deleting it affects nothing else. That took two minutes, and it is the reason the first item on the list is to give each person their own.
After you share it
Treat any key that passed through a person as something you will rotate. Rotation limits how long a stolen key is useful. The OWASP guidance recommends short-lived secrets where possible and expiry dates on the rest. A simple rule works for small teams:
- Note who has the key and when it was shared.
- Set a date to rotate it, even if nothing has gone wrong.
- If you think it leaked, revoke it first and investigate second.
- Scan your repositories for keys. Most hosting services offer this.
If you build tools that call APIs, you may also want the agent or script to use a key without ever seeing it. That is a different problem, and we cover it in AI agent API key security.
Questions people ask
Can I send an API key over Slack?
You can, but you should not. A key in a channel stays there, searchable and backed up. Use a burning link, a shared vault, or give the person their own key.
How do I share an API key with a contractor?
Create a separate key just for them, with the smallest permissions that work. Send it in a one-view link with a passphrase given by phone, and delete the key when the job ends.
How often should I rotate API keys?
Rotate on a schedule you will keep, and straight away if a key may have leaked. Any key that passed through a person is a good candidate for rotation after the job.
Where should I store API keys for an app?
In a secrets manager or your hosting platform's secret settings, read at run time. Keep them out of source code and out of files that get committed.