Admin API

Identity

Resolve accounts for display in admin tools.

const TOKEN = "hv_..."; // your API key
const headers = { Authorization: `Bearer ${TOKEN}` };

Resolve a handle or DID

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 adds 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.

With profile=true, the response also carries display_name and avatar (an image URL on the account's PDS) from the account's app.bsky.actor.profile record. Each is omitted when the profile record, or that field, is missing; a missing profile doesn't make the request fail.

Returns 400 for malformed input, a handle that cannot be resolved, or a DID whose document is missing, forbidden or invalid. Returns 502 when resolution may succeed on a retry: it takes longer than 10 seconds, is rate limited, or can't reach the DID document host. The error names the identifier and a general reason, never the underlying network error.