You hit send and a second later you realise what you just posted. A live password, an API key, a database connection string, maybe a photo of a recovery code. It is in a Slack channel with forty people, or in an email thread with someone outside the company, or in a WhatsApp group that includes your cousin.
First, breathe. This is one of the most common security slips there is, and it is very fixable. The order in which you fix it matters, though, and the instinct most people have, which is to delete the message, is not the first step. This page is the order of operations.
The one rule: deleting the message does not fix it
When you delete a message, you remove one copy of it. You do not remove the copies you cannot see. Depending on the service and how it is configured, a message can also exist as:
- A notification preview on other people’s phones and desktops.
- An entry in an email inbox, a sent folder and a server-side backup.
- A synced copy on every device that was logged in when it arrived.
- An item in a workspace export or an archive, if your admins enabled that.
- A screenshot, a forward or a copy-paste by someone who simply saw it.
You cannot check any of these. So the working assumption is that anything you posted has been seen, even if only by software. That is not paranoia. It is the only assumption that leads to the right fix, which is making the posted value worthless.
Step 1: Change the credential (do this first)
Go to the service the credential belongs to and replace it. The details depend on what you leaked:
- A password: change it, and if you reuse it anywhere else, change it there too. Then sign out of other sessions if the service offers that option.
- An API key or access token: revoke it and issue a new one. Many services let you do both in the same screen. Update the application or script that uses it, or it will stop working, which is a reasonable price.
- A database connection string: change the database password or rotate the user, then update whatever connects to it.
- A recovery code or backup code: regenerate the set so the old codes are void.
- A private key or certificate: treat it as compromised, generate a new one and replace it where it is installed.
- A webhook secret or signing key: rotate it on both sides of the integration.
Do this before anything else, even before telling anyone. If you do nothing else on this list, doing this means the message in the chat is a string of characters that no longer opens anything.
If the credential is one you cannot rotate quickly, for example it is baked into a customer-facing system, tell the person responsible for that system immediately so they can plan the change.
Step 2: Check whether it was used
Once the new credential is in place, look for signs that the old one was used by someone else between the time you posted it and the time you changed it. Most services keep some kind of activity record:
- Sign-in history or “recent security activity” pages for accounts.
- Access logs and API usage pages for keys.
- Billing and usage dashboards, where an unexpected spike can be the first sign.
- Audit logs, in tools that have them.
You are looking for logins from places you do not recognise, calls at odd hours, new resources you did not create, or changed settings. If you find anything, you have moved from a mistake to an incident, and you should tell whoever owns security at your organisation, or the owner of the account if you are on your own.
If nothing looks unusual, that is reassuring but not proof. Logs have gaps, so keep the credential change in place regardless.
Step 3: Limit the remaining copies
Now, and only now, clean up. It does not repair the exposure, but it shrinks it and stops further spread.
- Delete the message from the channel or thread. In a workspace, you can usually delete your own messages. If it was posted somewhere you cannot delete from, ask an admin.
- Tell people who saw it to ignore it and not to copy it. Keep the wording factual: “I posted a credential by mistake and have already rotated it. Please do not use or forward it.”
- For email, delete the sent message and ask the recipient to delete theirs, and to empty their trash. Remember that you cannot verify this.
- For a public place, such as a public repository, a forum or a ticket that customers can see, treat it as seen by everyone. In a public repository, removing the file in a new commit leaves the value in the history, so rotation is the only real fix.
- If a search engine or a third-party tool may have indexed it, use the removal process that service provides. This is rare for chat, but it does happen with public pages.
Step 4: Tell the right people
Who needs to know depends on what leaked and where.
- A personal account: nobody, beyond whoever else uses it.
- A shared team credential: your team, so they can pick up the new one. Do not send the new one the same way. See step 5.
- A customer’s data or a customer-facing system: your manager or security contact right away. If personal data may have been exposed, there may be a legal duty to assess and report, and the clock can be short. Your organisation’s privacy lead or a lawyer should decide that, not you at the end of a long day.
- A client’s credential: the client, promptly and plainly. Clients tend to forgive an honest “I made a mistake and have already fixed it” far more readily than a discovery.
Reporting early is almost always better than reporting late. Most workplaces would much rather hear about it in five minutes than find it in a log in five weeks.
Step 5: Send the replacement properly
This is where people repeat the original mistake. The new password or key has to reach whoever needs it, and the quick way is the same chat window. Do not do that.
Put the new value behind a one-time, encrypted link and send the link. With EasyToPaste, your browser encrypts the value with AES-256-GCM before anything leaves your device, and the decryption key sits in the part of the link after the #, which browsers do not send in web requests. The server stores only the encrypted version, and the secret self-destructs on read or when it expires. You can read how that works on the How It Works page, and what the service can and cannot see on the Security page.
For the replacement credential:
- Use the shortest expiry that works. The default on the free plan is one day, and the maximum is 30 days.
- Send the link to the person who needs it, not the channel.
- For a high-stakes credential, rotate it rather than relying on a second factor. Splitting the key across two channels is not possible yet — the Code + Passphrase mode is designed but not shipped, and the app lists it as coming soon — so the link is the key, and a short expiry plus a single named recipient are the controls you have.
- Ask for confirmation, and treat a link that stopped working before the recipient opened it as a warning sign.
Our guides on sharing a password securely and why not to send secrets in chat go deeper on each of these.
Step 6: Write down what happened
Take three minutes to note: what was exposed, where it was posted, how long it was live before rotation, who could have seen it, what you checked, and what you changed. If anything comes of it later, you will want an accurate account written while it was fresh. If nothing does, you have a short note that proves you handled it well.
Step 7: Make the next one harder to do
Accidents are usually process failures in disguise. A few small changes reduce the chance of a repeat:
- Make “send me the key” lead to a link, not a paste. If the quick way is also the safe way, people take it.
- Use a password manager so people are not copying values from notes and documents.
- Keep secrets out of code and tickets. Store them in a proper place, and reference them by name. The secrets-handling checklist for small dev teams walks through this.
- Turn on secret scanning where your tools offer it, for repositories and, in some tools, for chat.
- Prefer short-lived credentials. A key that expires by default limits the cost of the next slip.
What not to do
- Do not wait to see whether anyone noticed. The cost of rotating is small. The cost of guessing wrong is not.
- Do not just edit the message. In many tools, edits are tracked or the original is cached elsewhere.
- Do not blame the person who pasted it. If the system made it easy to do the wrong thing, fix the system. People who fear punishment hide mistakes, and hidden mistakes are the expensive ones.
- Do not send the new credential in the same thread.
The short version
- Change or revoke the credential first.
- Check activity logs for use between posting and rotating.
- Delete the message and ask people to ignore it, knowing this is cleanup and not a cure.
- Tell the people who need to know, early.
- Send the replacement through an encrypted, one-time link.
- Write a short note of what happened.
- Change the habit so the next slip is harder.
When you are ready to send the new credential, create a secret and share the link. Limits for each plan are on the pricing page.
If the account in question is Slack itself, the reset and the hand-over are two different problems: Slack password reset — how to share the new credential safely covers who is allowed to set the password and what to send instead of typing it into the thread.