ShareSafeNote

Sharing API keys and credentials with a developer or a client

5 min read · updated October 4, 2026

Sooner or later, a credential has to change hands. A freelancer builds your payment integration, a contractor needs the staging database, or you are the freelancer and the job ends with handing the client access to everything you set up. The easy path is to paste the key into an email or a chat message. The problem is that the message outlives the need: it stays in two inboxes, in chat history, in backups and on every synced phone, long after anyone remembers it. This guide covers how to hand over API keys and credentials so that what you share is limited, temporary and easy to revoke.

Hand over the smallest key that does the job

The safest credential to share is one that can do very little. Ask what the person actually needs to do, then create access for exactly that.

  • Use scoped or restricted keys. Many APIs and cloud platforms let you limit a key to certain actions or resources: read-only access, a single project, one storage bucket. Look for "restricted keys", "scopes" or "permissions" in the provider's documentation.
  • One key per person and per environment. Never hand over your personal key or the one your production app runs on. Create a dedicated key with a clear name, such as contractor-alex-staging, so you can revoke it without breaking anything else.
  • Test keys first. Payment processors and many other APIs offer separate test credentials. A developer building an integration rarely needs live keys before launch, and at launch whoever owns production can enter them directly.
  • Prefer an invitation to a shared secret. If the platform lets you invite someone with their own account and a limited role, do that instead of sharing an admin password. They get their own multi-factor authentication, and you can remove them in one click.

Put an end date on every credential

A key meant for a two-week contract should not still work two years later. Set an expiry date when you create a token if the provider supports it; otherwise, put a reminder in your calendar.

Rotation after handover matters just as much. When a freelancer delivers an integration, the client should generate fresh keys the freelancer never saw. The freelancer's copies become worthless, which protects both sides: the client no longer depends on someone else's laptop, and the freelancer can't be suspected of misusing old keys. To avoid an outage, work in order: create the new key, deploy it, confirm everything works, and only then revoke the old one.

Keep keys out of git

Add your .env file and any key files to .gitignore, and commit a .env.example with placeholder values instead. A private repository is not a vault: everyone with read access, every CI service and every clone on every laptop has a copy.

If a key does get committed, the order of operations matters:

  1. Rotate first. Revoke or replace the key at the provider right away. Once a commit has been pushed, assume the key has been copied, through clones, forks, CI caches or mirrors.
  2. Check the provider's logs for any use of the key while it was exposed.
  3. Then clean the history. Deleting the file in a new commit leaves the secret in every earlier commit. Use a history-rewriting tool, force-push, and have collaborators re-clone. This limits future exposure, but it cannot recall copies already made.

Secrets managers for the long term, one-time links for the handover

Storing a credential for months and passing it to another person are different problems. For storage, use a secrets manager: your cloud provider's secret store, a dedicated vault, your CI platform's encrypted variables or a team password manager. Applications then read credentials from environment variables injected at deploy time, and the code contains none.

The handover usually happens in email or chat, and that is where secrets leak. With ShareSafeNote, the note is encrypted in your browser with AES-256-GCM before it is uploaded. The decryption key stays in the part of the link after the #, which browsers never send to the server, and the note is deleted the moment it is read. The recipient opens it once and moves the value straight into their own secrets manager. For the mechanics, see client-side encryption explained and why one-time links help.

Send the link through a different channel than the one where you explain what it is for, and ask for confirmation of receipt. If the recipient finds the note already gone and it had not expired, assume someone else read it and rotate the key.

Offboarding a freelancer or contractor

When the engagement ends, access should end with it. Asking someone to delete local copies is polite, but it is not a control; revocation and rotation are.

  • Revoke every per-person key you created for them.
  • Remove their accounts from cloud consoles, code hosting, CI, DNS, email and shared tools.
  • Rotate the shared credentials they saw: database passwords, SMTP credentials, shared admin logins.
  • Look for what they created on your accounts: deploy keys, SSH keys, OAuth apps, webhooks, tokens.
  • If you are the freelancer, list your access in your handover notes and recommend that the client rotate it.

Audit logs are your final check. Many platforms record when keys are created, used and revoked, sometimes with the source IP address. Confirm that the new key is used only from where you expect, and that revoked keys show no successful activity. Clear key names help: "key-3" will mean nothing six months from now.

A handover checklist

  1. List the credentials the person needs, and why.
  2. Create scoped, per-person keys, test keys where possible.
  3. Set an expiry date or a rotation reminder.
  4. Tell the recipient which channel the link will arrive on.
  5. Send the value as a one-time encrypted link, with context in a separate message.
  6. Have the recipient confirm receipt and store it in a secrets manager.
  7. Delete drafts and temporary copies, and record who has access to what.
  8. At the end of the engagement: revoke, rotate, review the logs.
What a one-time link does not do: it protects the transfer, not what happens afterward. Whoever has the full link can read the note, so it should go only to the intended person. Once the recipient has the value, its safety depends on their device and habits. And a lost link cannot be recovered; you simply create a new note.

When it is time for a handover, create a one-time note, put only the credential in it, and keep the rest of the conversation where it already happens. For the human side of sharing secrets, see our guide on sharing passwords securely.

Share your next secret the safe way

Encrypted in your browser, read once, then gone. No account needed.

Create a secure note