Skip to main content
Bluesky uses the AT Protocol (ATProto) instead of OAuth. Rather than redirecting you to an authorization page, Hayon authenticates directly with bsky.social using your Bluesky handle and an app password you generate inside your Bluesky account settings.
Never use your main Bluesky account password. Always create a dedicated app password for Hayon. App passwords have limited permissions and can be revoked independently without affecting your account access.

How Bluesky auth works

Hayon uses the @atproto/api SDK to authenticate with the AT Protocol service at https://bsky.social. On successful login, the SDK returns:
  • did — your decentralized identifier (e.g. did:plc:abc123), the stable unique ID for your account.
  • handle — your human-readable handle (e.g. you.bsky.social).
  • accessJwt — a short-lived JWT for making authenticated API calls.
  • refreshJwt — a longer-lived JWT used to resume the session without re-entering credentials.
Hayon stores the did, handle, accessJwt, and refreshJwt in your SocialAccount document. Your app password is used only at connect time and is never persisted.

Creating an app password

1

Open Bluesky settings

Log in to Bluesky and navigate to Settings > Privacy and security > App passwords.
2

Create a new app password

Click Add app password, give it a descriptive name (e.g. hayon), and click Create app password.
3

Copy the password

Bluesky displays the app password once. Copy it immediately — you cannot retrieve it again. The format is xxxx-xxxx-xxxx-xxxx.

Connecting your Bluesky account

1

Open platform settings

In the Hayon dashboard, navigate to Settings > Connected accounts and click Connect next to Bluesky.
2

Enter your credentials

Provide your Bluesky handle (e.g. yourname.bsky.social) and the app password you created above.
3

Submit

Hayon sends a POST /api/platform/bluesky/connect request with the following body:
{
  "identifier": "yourname.bsky.social",
  "appPassword": "xxxx-xxxx-xxxx-xxxx"
}
4

Profile fetched

On success, Hayon fetches your Bluesky profile (display name, bio, avatar) and stores your session tokens. The account appears as connected in the dashboard.

Required credentials

FieldDescriptionExample
identifierYour Bluesky handle or email addressyourname.bsky.social
appPasswordApp password generated in Bluesky settingsxxxx-xxxx-xxxx-xxxx
The identifier field accepts either your full handle (e.g. yourname.bsky.social) or your registered email address.

Session refresh

Hayon can refresh your Bluesky session without re-entering credentials as long as the refreshJwt is valid. To manually refresh your stored profile data, call:
GET /api/platform/bluesky/refresh
Authorization: Bearer <hayon-jwt>
This resumes the AT Protocol session using the stored refreshJwt and updates your accessJwt, handle, display name, and avatar in the database.
If both the accessJwt and refreshJwt have expired (e.g. after an extended period of inactivity), the session cannot be resumed. You must disconnect and reconnect Bluesky with your credentials.

Supported post types

Bluesky posts (called skeets in community parlance) are text-based with optional attachments.
Content typeSupported
Text postsYes
Links with preview cardYes (via facets)
ImagesYes (up to 4 images per post)
VideosNo
PollsNo
Threads / reply chainsNo (single posts only)

Character limits and media constraints

  • Character limit: 300 graphemes per post (not bytes — emoji count as 1).
  • Image limit: Maximum 4 images per post.
  • Image size: Each image must be under 1 MB.
  • Image formats: JPEG, PNG, and GIF (static) are accepted by the AT Protocol.
  • Alt text: Bluesky supports alt text per image; Hayon passes this through when provided.
Posts exceeding 300 graphemes will be rejected by bsky.social with a validation error. Hayon does not automatically truncate post content.

Disconnecting

To disconnect your Bluesky account, navigate to Settings > Connected accounts and click Disconnect next to Bluesky, or call:
DELETE /api/platform/bluesky/disconnect
Authorization: Bearer <hayon-jwt>
This clears your stored did, handle, accessJwt, refreshJwt, and profile data from the SocialAccount document and sets connected: false.
Disconnecting from Hayon does not invalidate the app password on Bluesky’s side. To fully revoke Hayon’s access, go to Settings > App passwords on Bluesky and delete the app password you created.

Troubleshooting

Verify that your handle is correct (include the full domain, e.g. yourname.bsky.social) and that the app password matches exactly. App passwords are case-sensitive and include the dashes.
When the health status shows expired or needsReconnection: true, both JWTs have become invalid. Disconnect Bluesky and reconnect with your handle and a new app password.
If the refresh endpoint returns an error, your refreshJwt may have expired. Reconnect the account to obtain a fresh session.

Build docs developers (and LLMs) love