Bluesky handle finder (DID to handle)

Markdown version

GET/tools/handle-finder

Finds the handle of a DID: the handle its DID document claims, whether that handle resolves back to it, and the display name and avatar when the AppView serves them.

Parameters

NameInTypeDescription
did (required)querystringA DID (`did:plc:…`, `did:web:example.com`), an `at://did…` URI or a bsky.app link with a DID.

Responses

StatusDescriptionBody
200The tool's answer, with the canonical URL of its page.ToolHandleFinder
400Invalid query parameter (code `bad_request`).Error
401Unknown, expired or revoked token (code `unauthorized`). Without an `Authorization` header, the tool answers anonymously.Error
404Not found. Also returned on a bot's handle subdomain: the API is only served on the main site.Error
429Rate limited: `toolsApi` (60 a minute) and `toolsApiDaily` (2,000 a day) per IP, or 10 times both per account with a creator's token. A tool that fans out costs more than one call.Error
500Unexpected error.Error
502The service the tool asks did not answer (code `upstream_error`).Error

Example

bash
curl \
  -G \
  --data-urlencode "did=did:plc:z72i7hdynmk6r22z27h6tvur" \
  -H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
  https://bluesky.bot/api/v1/tools/handle-finder

Schemas

Error

FieldTypeDescription
error (required)object
error.code (required)string: "bad_request", "invalid_handle", "not_found", "rate_limited", "internal_error", "unauthorized", "forbidden", "conflict", "invalid_grant", "upstream_error", "insufficient_scope", "invalid_listing", "consent_required"
error.message (required)string
error.reasonstringWith `invalid_handle`, `invalid_listing`, `conflict` and `forbidden`: e.g. `reserved`, `taken`, `too_long`, `no_handle`, `suspended`.
error.urlstring, uriWith consent_required: open this dashboard page to grant profile editing.
error.fieldstringWith `invalid_listing`: the refused field.
error.scopestringWith `insufficient_scope`: the scope the token lacks.
error.parameterstringThe invalid query parameter.
error.retryAfterSecondsinteger (1–)With `rate_limited`.

ToolHandleFinder

FieldTypeDescription
tool (required)string = "handle-finder"The tool's slug.
url (required)stringThe canonical URL of the tool's page on Bluesky.bot.
result (required)objectThe tool's answer.
result.did (required)stringThe DID.
result.didMethod (required)string: "plc", "web"The DID method.
result.handle (required)string | nullThe handle the DID document claims; null when it claims none.
result.unicodeHandle (required)string | nullThe Unicode form of an internationalised handle, else null.
result.verified (required)boolean | nullThe handle resolves back to this DID; null when it could not be checked.
result.resolvesTo (required)string | nullThe DID the handle resolves to now, when it is another one.
result.displayName (required)string | nullThe display name, when the AppView serves it.
result.avatar (required)string | nullThe avatar's URL, when the AppView serves it.
result.accountStatus (required)string: "takendown", "suspended", "deleted", "deactivated", "desynchronized", "throttled" | nullWhy the account is gone (`takendown`, `suspended`, `deactivated`, `deleted`…); null when it is not.
result.warnings (required)string: "not_bidirectional", "dns_https_conflict", "handle_moved", "multiple_txt", "handle_invalid", "account_gone", "appview_only"[]Problems found, explained on the tool's page: `not_bidirectional`, `dns_https_conflict`, `handle_moved`, `multiple_txt`, `handle_invalid`, `account_gone`, `appview_only`.