Skip to content

Identity

Resolve accounts for display in admin tools.

const TOKEN = "hv_..."; // your API key
const headers = { Authorization: `Bearer ${TOKEN}` };
GET /admin/identity/resolve?identifier=<handle-or-did>

Requires authentication. No specific permission is needed.

interface ResolvedIdentity {
did: string;
handle: string | null;
display_name?: string; // with profile=true
avatar?: string; // with profile=true
}
const params = new URLSearchParams({ identifier: "alice.bsky.social" });
const response = await fetch(
`http://127.0.0.1:3000/admin/identity/resolve?${params}`,
{ headers },
);
const data: ResolvedIdentity = await response.json();
ParameterTypeRequiredDescription
identifierstringyesA handle (a leading @ is allowed) or a DID
profileboolnotrue also returns display_name and avatar

Response: 200 OK

{
"did": "did:plc:abc123",
"handle": "alice.bsky.social"
}

handle is null unless the DID document lists the handle in alsoKnownAs and the handle resolves to the same DID. A returned handle is in lowercase.

profile=true adds display_name and avatar from the account’s app.bsky.actor.profile record. avatar is a com.atproto.sync.getBlob URL on the account’s PDS. A field the record doesn’t set is left out. Both are left out when the account has no profile record or its PDS can’t be reached, and the request still succeeds.

Errors use two statuses. 400 means the input can’t succeed as given: it’s malformed, the handle doesn’t resolve, or the DID document is missing, forbidden or invalid. 502 means the failure is on the network side and a later attempt may work: resolution ran past 10 seconds, the DID document host was unreachable, or it rate limited the lookup. The error names the identifier and a general reason, never the underlying network error.