Bluesky handle to DID API
The permanent DID behind a Bluesky handle.
GET /v1/bluesky/handles/{handle}1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/bluesky/handles/espn.com",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "did": "did:plc:x7d6j54pm22ufehkes6jo4jf"}Parameters
| Name | Type | Description |
|---|---|---|
handlepath · required | string | Handle (espn.com, @jay.bsky.social), DID (did:plc:…) or a bsky.app profile URL. Example: espn.com. |
Response fields
200 with a BlueskyResolvedHandle, in the AT Protocol’s own app.bsky lexicon JSON.
| Field | Type | Description |
|---|---|---|
did | string | The account’s DID: its permanent id. |
Status codes
| Status | Meaning |
|---|---|
200 | The DID. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The account, post, feed, list or starter pack does not exist, was deleted or taken down. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Bluesky is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Bluesky is a trademark of Bluesky Social PBC. We are not affiliated with or endorsed by Bluesky.