BlueskyUpdated

Bluesky API error codes and how to fix them

Bluesky errors return a JSON body with an error name and a message. ExpiredToken means the session token expired and was not refreshed, AuthenticationRequired a wrong handle or app password, InvalidRequest usually text over 300 graphemes, BlobTooLarge an image over 1,000,000 bytes. Each error below has the fix. Siar, a unified social media API, keeps Bluesky’s own code and message on the post and adds the fix below.

Jump to a code: ExpiredToken, AuthenticationRequired, AccountTakedown, InvalidRequest, BlobTooLarge, InvalidMimeType, RateLimitExceeded, use_dpop_nonce, invalid_grant, InvalidSwap.

Codes and messages are what Bluesky returns. Where Bluesky documents a code, this page follows its docs.

ExpiredToken · Token has expired · the session token expired

ExpiredToken means the short-lived access token for the Bluesky session has expired. Fix: call com.atproto.server.refreshSession with the refresh token, then repeat the request with the new access token. If the refresh also fails (the refresh token expired or the app password was revoked), sign in again with createSession or OAuth.

What Siar does with it: Siar refreshes the token itself where Bluesky allows it. If that fails, Siar marks the account as needing reconnection and keeps this error on the post. Later posts to the account stop with "Reconnect this account, then retry the post." until your customer reconnects through the same connect link.

Bluesky's message: Token has expired

Related: Post to Bluesky via API

AuthenticationRequired · Invalid identifier or password · the handle or app password is wrong

The handle or app password given at connect time is wrong (or the app password was deleted). Create a new app password in Bluesky (Settings, Privacy and security, App passwords) and sign in again.

What Siar does with it: Siar refreshes the token itself where Bluesky allows it. If that fails, Siar marks the account as needing reconnection and keeps this error on the post. Later posts to the account stop with "Reconnect this account, then retry the post." until your customer reconnects through the same connect link.

Bluesky's message: Invalid identifier or password

AccountTakedown · Account has been taken down · moderation took the account down

Bluesky moderation took the account down or the user deactivated it. Resolve it with Bluesky; the account cannot post until then.

What Siar does with it: Siar keeps Bluesky's code and message on the post, word for word, marks it "don't retry" or "unknown", and still publishes to the other networks in the post. Fix the cause, then call POST /post/{id}/retry: only the failed networks are sent again, and the retry doesn't count as another post.

Bluesky's message: Account has been taken down

InvalidRequest · Record/text must not be longer than 300 graphemes · the text is too long

Bluesky counts graphemes; the text is over 300 (or over 3000 bytes). Shorten the text or split it into replies.

What Siar does with it: Siar checks this rule when you create the post. A request that breaks it gets a 400 with an issues entry pointing at the field, before Bluesky sees it, so you fix it at create time, not when the post is due.

Bluesky's message: Record/text must not be longer than 300 graphemes

BlobTooLarge · This file is too large · the image or video is over the limit

An image is over 1,000,000 bytes (about 976 KB) or a video is over the service limit. Keep images under 1,000,000 bytes; compress or resize.

What Siar does with it: Siar keeps Bluesky's code and message on the post, word for word, marks it "don't retry" or "unknown", and still publishes to the other networks in the post. Fix the cause, then call POST /post/{id}/retry: only the failed networks are sent again, and the retry doesn't count as another post.

Bluesky's message: This file is too large

InvalidMimeType · Unsupported or mismatched media type · the file type is wrong

The blob is not a supported image/video format, or its bytes do not match the declared type. Use JPEG, PNG, WebP or GIF images and MP4/WebM/MOV video.

What Siar does with it: Siar keeps Bluesky's code and message on the post, word for word, marks it "don't retry" or "unknown", and still publishes to the other networks in the post. Fix the cause, then call POST /post/{id}/retry: only the failed networks are sent again, and the retry doesn't count as another post.

Bluesky's message: Unsupported or mismatched media type

RateLimitExceeded · Rate Limit Exceeded · a PDS limit was hit

A PDS limit was hit (about 1,666 record creates an hour and 11,666 a day per account, plus per-IP limits on createSession). Wait until the reset time in the response headers, then retry.

What Siar does with it: Siar treats it as temporary and tries again on its own, up to three attempts in all. It waits for Bluesky's reset time when Siar can read one from the response, otherwise 30 seconds, then 60. These attempts don't use the post's manual retries. If the last attempt fails too, the error stays on the post.

Bluesky's message: Rate Limit Exceeded

use_dpop_nonce · Authorization server requires nonce in DPoP proof · send the server's new nonce

OAuth servers rotate a DPoP nonce; the first request of a session is always rejected with it. Repeat the request once with the nonce from the `DPoP-Nonce` header.

What Siar does with it: Siar retries once with the new nonce automatically.

Bluesky's message: Authorization server requires nonce in DPoP proof

invalid_grant · refresh token is invalid, expired or revoked · the OAuth grant is gone

OAuth refresh failed (public clients get shorter refresh lifetimes) so the grant is gone. Run the OAuth flow again.

What Siar does with it: Siar refreshes the token itself where Bluesky allows it. If that fails, Siar marks the account as needing reconnection and keeps this error on the post. Later posts to the account stop with "Reconnect this account, then retry the post." until your customer reconnects through the same connect link.

Bluesky's message: refresh token is invalid, expired or revoked

InvalidSwap · Record already exists · the record was already written

A record with the same key was already written, which is how a retried publish is detected. Nothing to fix: the record exists.

What Siar does with it: Siar uses this to detect a publish that already happened and treats the post as sent, so it isn't posted twice.

Bluesky's message: Record already exists

Where to see a Bluesky error in Siar

Read a failed post with GET /post/{id}. The error field sums it up, errors lists the result per network, and errorsVerbose keeps Bluesky's own code, message and HTTP status, a plain-English message, and a retry verdict: retryable, non_retryable or unknown. A signed post.published webhook fires when the post has published or failed, with each network's result. Fix the cause and retry with POST /post/{id}/retry.

Siar, a unified social media API, publishes to Facebook, Instagram, Threads, X, LinkedIn profiles, Bluesky, Mastodon, Discord and Slack today. See each network's status, or go back to Post to Bluesky via API.

Error codes for other networks

The same pattern, for each network Siar is built for: social media API error codes, by network. For errors from Siar's own API (a 401 for a missing key, a 429 rate limit), see Siar API errors and status codes.

TikTok API error codes · YouTube API error codes · Instagram API error codes · Facebook API error codes · X (Twitter) API error codes · Threads API error codes · LinkedIn API error codes · Pinterest API error codes · Reddit API error codes · Mastodon API error codes · Discord API error codes · Slack API error codes · Google Business Profile API error codes · Snapchat API error codes

Frequently asked questions

How do I fix Bluesky ExpiredToken?

Refresh the session. Call com.atproto.server.refreshSession with the refresh token, then repeat the request with the new access token. Access tokens are short-lived by design, so expect this regularly. If the refresh fails too, the refresh token has expired or the app password was revoked: sign in again.

Should I retry a failed Bluesky API request?

Only if the error is temporary. Rate limits (429 and Bluesky's own rate-limit codes) and 5xx errors can be retried after the reset time. Token, permission, duplicate and content errors fail the same way every time, so fix the cause first. Each entry on this page says which kind it is.

Why does the Bluesky API reject a request that looks right?

Usually because of something outside the request body: an expired token, a permission the user didn't grant, the account's daily limit, or text the account posted recently. Read the code and message first, then match it to an entry on this page. Validating length and media before sending catches most of the rest.

Does Siar retry failed Bluesky posts automatically?

For temporary errors, yes: Siar tries up to three times in all, waiting for the network's reset time when it can read one. Other errors stay on the post with Bluesky's own code and message. Fix the cause and retry: only the failed networks are sent again, and the retry doesn't count as another post.

Will retrying a failed post publish it twice?

Not through Siar's retry. Each network in a post is claimed once, and only the networks that failed are sent again. An interrupted send is checked against the account before anything is re-sent. But calling the create endpoint again makes a new post: Siar has no client idempotency key, so check your own records first.

Your first post is one request away.

Start with 20 free posts to try. No card. A one-time allowance, with no time limit.