Bluesky DID finder

Markdown version

GET/tools/did-finder

Finds the DID behind a Bluesky handle: DNS TXT and HTTPS well-known answers, the AppView's opinion, and whether the DID document claims the handle back.

Parameters

NameInTypeDescription
handle (required)querystringA handle (`alice.bsky.social`, `@alice.bsky.social`) or a bsky.app profile link.

Responses

StatusDescriptionBody
200The tool's answer, with the canonical URL of its page.ToolDidFinder
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 "handle=bsky.app" \
  -H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
  https://bluesky.bot/api/v1/tools/did-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`.

ToolDidFinder

FieldTypeDescription
tool (required)string = "did-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.status (required)string: "found", "conflict", "free"`found`: a DID; `conflict`: the methods disagree, so the handle does not resolve; `free`: an unclaimed Bluesky.bot name.
result.handle (required)stringThe handle, normalised.
result.unicodeHandle (required)string | nullThe Unicode form of an internationalised handle, else null.
result.did (required)string | nullThe DID, or null.
result.method (required)string: "dns", "https", "both", "appview" | nullWhich method gave the DID: `dns`, `https`, `both`, or `appview` when only the AppView knows it.
result.dns (required)objectWhat one resolution method answered.
result.dns.status (required)string: "found", "none", "invalid", "conflict", "error"`found`: a DID; `none`: no answer; `invalid`: an answer that is not a DID; `conflict`: several DNS records with different DIDs; `error`: could not check.
result.dns.didstringThe DID this method found.
result.dns.didsstring[]The DIDs of conflicting DNS records.
result.https (required)objectWhat one resolution method answered.
result.https.status (required)string: "found", "none", "invalid", "conflict", "error"`found`: a DID; `none`: no answer; `invalid`: an answer that is not a DID; `conflict`: several DNS records with different DIDs; `error`: could not check.
result.https.didstringThe DID this method found.
result.https.didsstring[]The DIDs of conflicting DNS records.
result.appview (required)objectWhat one resolution method answered.
result.appview.status (required)string: "found", "none", "invalid", "conflict", "error"`found`: a DID; `none`: no answer; `invalid`: an answer that is not a DID; `conflict`: several DNS records with different DIDs; `error`: could not check.
result.appview.didstringThe DID this method found.
result.appview.didsstring[]The DIDs of conflicting DNS records.
result.verified (required)boolean | nullThe handle verifies both ways: DNS or HTTPS names the DID and its document claims the handle back. False for a DID only the AppView knows; null when it could not be checked.
result.claimedHandle (required)string | nullThe handle the DID document claims, when it is another one.
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`.