Create, store and revoke a Bluesky app password
Use a separate credential for a bot you operate. Learn when app passwords fit, when a service needs OAuth, and how to replace or revoke a program's access.
By The Bluesky.bot team
- Published:
- Updated:
- Reviewed:
Choose the right kind of sign-in
An app password is a separate credential for a particular Bluesky client, personal bot or command-line script. It lets that program sign in without receiving your main account password. It is still a powerful credential: do not describe it as a post-only permission or treat it as public configuration.
For a service offering sign-in to other people's accounts, use the protocol's OAuth flow. This tutorial is for a bot or client that you operate yourself. Signing in to Bluesky.bot uses OAuth; you do not need to paste an app password into our directory or these public guides.
You need access to the intended account in the official Bluesky app or website, a way to store the new value privately, and a clear name for the program that will use it. Nothing on this page creates or revokes a password for you.
1. Open the settings for the correct account
Switch to the bot's account first. Open Settings → Privacy and security → App passwords, or use the official app-password settings.
Check the signed-in handle before creating anything. A password created for your personal account will not turn a script into your bot; it authorizes the account that created it. If the account has a custom handle, use its complete current handle when configuring the script.
The setting names may change with app versions or translation. The linked route and behavior were reviewed against the official app source on 19 November 2026; this guide did not create a password or test an authenticated session.
2. Create one password for one program
Choose Add app password and a descriptive name such as rss-bot-laptop. One name per program or device makes later rotation understandable.
The app can offer access to direct messages. Leave that option disabled for a posting-only bot: RSS publication does not require DM access. Check the actual permissions requested by your chosen client rather than assuming every integration needs the same access.
Copy the generated value into a password manager or a protected local secret store. The app displays the new value once; the saved list is not a way to reveal it later. If you lose it, create a replacement and revoke the unused one.
3. Give the credential only to your local program
Use environment variables or a local environment file excluded from Git. The example below is for Bash and hides the password while you type; replace the handle with your bot's actual handle. It does not log in by itself.
export BLUESKY_HANDLE="your-bot.bsky.social"
read -r -s -p "App password: " BLUESKY_APP_PASSWORD
printf '\n'
export BLUESKY_APP_PASSWORDDo not put the value into a website query string, a README, a command pasted into an issue, or a screenshot. A masked input protects your terminal display, not a malicious program: only run code you trust.
If using a local .env file, restrict its permissions and exclude it from source control. A private Git repository is not a secret manager. Configuration names can be documented; actual values should stay on the machine that runs the bot.
The TypeScript tutorial and Python tutorial show how the SDK uses the credential. Read the code and run its preview or offline tests before enabling publication. With the reusable RSS posting kit, run previews and run --publish is the explicit write operation.
4. Configure the correct personal data server
Many accounts use a Bluesky-operated PDS, but the handle is not necessarily the server URL. A custom handle or account migration can coexist with a different PDS.
Resolve the account's DID and inspect its #atproto_pds service using the Whois tool. Configure the SDK with that HTTPS service. In the tutorial kit this is BLUESKY_SERVICE; other clients may use a different setting name or discover it automatically.
Do not send a password to an arbitrary URL copied from a feed, message or unverified tutorial comment. If a correct password fails after a migration, verify the account's current service before generating several more credentials.
5. Rotate or revoke a program's access
For routine rotation, create a new clearly named app password, update the program's protected configuration, and verify one intended operation. Then return to the official settings and revoke the old password by its name.
If a credential has been exposed, stop the program and revoke it promptly, then review the account's activity and connected applications. Removing it from a file or deleting a public commit is not a substitute for revocation.
Revocation prevents new logins with that password. Do not assume every already-issued access token disappears instantaneously; session/token behavior and the client's stored credentials also matter. OAuth connections are managed separately from app passwords. Review both when investigating unwanted access.
For local Bash cleanup after a one-off session:
unset BLUESKY_APP_PASSWORDThat removes the variable from the current shell only. It does not revoke the password, remove it from a secret file or erase an earlier leak.
Troubleshoot without sharing the secret
| Symptom | Check first | Next step |
|---|---|---|
| Wrong account posts | The account used to create the password | Stop the program; create a credential under the intended bot account |
| Login is refused | Complete current handle, copied value, revocation status | Check locally and replace the credential if needed |
| Login stopped after migration | Current DID and PDS service | Point the client at the correct service |
| You cannot reveal the saved value | The one-time display has already closed | Generate a new named value; revoke the unused one |
| A client asks for the main password | Whether it supports OAuth or app passwords | Verify its documentation before trusting it |
| A posting-only bot asks for DM access | Its actual feature requirements | Keep unnecessary access off; choose a suitable client |
You can describe an error, client version and sanitized service hostname when asking for help. Never include the password, bearer tokens, refresh tokens, cookie contents or a complete environment dump.
Before leaving the bot unattended
Name the credential, use the intended account, keep unnecessary privileges off, protect local configuration, verify the PDS, test one deliberate operation, and know how to stop and revoke access. For a timed bot, follow the durable scheduling tutorial; for an identity check, see verifying a bot's handle.
This process protects the main password from the program; it does not make an untrusted program safe or give permission to automate unsolicited interactions. Follow the account's intended purpose and Bluesky's rules.