How to Share API Keys Securely for a Temporary Integration
How to share API keys securely with a developer or vendor: limit the key, send it in a one-time link, and plan how you’ll rotate or revoke it.
The short answer
Never paste a key into chat, email or a ticket. Create a separate key with limited permissions, send it in a one-time link that expires, and decide in advance when you’ll rotate or revoke it. That’s the whole recipe for sharing an API key securely.
One key per integration
Create a separate key with only the permissions the integration needs. Use a test environment if you can, and write down who owns the key and when it should be revoked. A production key shared by several integrations is much harder to rotate later.
Send it carefully
Use a one-time link with a short expiry, plus a passphrase if the channel is shared. Don’t paste keys into tickets or CI logs. Send the link straight to the person who owns the integration, and tell them which secrets manager the key should go into.
Checklist for a temporary integration
- Permissions: the key can only do what the integration needs, ideally in a test environment first.
- Owner and end date: you know who is responsible for the key and when it should stop working.
- Handoff: the key travels in a one-time link with a short expiry, straight to the integration owner. Any passphrase goes by a different channel.
- Storage: the recipient puts the key in a secrets manager, never in code, tickets or build logs.
- Rotation or revocation: there’s a date in the calendar to rotate the key, or to revoke it when the integration ends.
Replace it before you revoke it
When it’s time to rotate, deploy a new key and check it works first. Then revoke the old one. If you think the old key leaked, revoke it straight away and check the provider’s activity logs. Next time you share an API key securely, the same checklist applies.
Share an API key securely