已領取帳號代碼背後的 DID
GET/resolve/{handle}
與 `https://<handle>/.well-known/atproto-did` 的回答相同。僅限 `*.bluesky.bot` 帳號代碼。
參數
| 名稱 | 位置 | 類型 | 說明 |
|---|---|---|---|
| handle (必填) | path | string | 完整的帳號代碼,例如 `weather.bluesky.bot`(不區分大小寫)。 |
回應
| 狀態碼 | 說明 | 內容 |
|---|---|---|
| 200 | 帳號代碼及其 DID。 | Resolution |
| 400 | 不是 `*.bluesky.bot` 帳號代碼(代碼 `invalid_handle`)。 | Error |
| 404 | 找不到。在機械人的帳號代碼子網域上也會傳回此結果:API 僅在主站提供。 | Error |
| 429 | 已達速率限制(政策 `publicApi`,依 IP)。 | Error |
| 500 | 未預期的錯誤。 | Error |
範例
curl https://bluesky.bot/api/v1/resolve/weather.bluesky.bot結構描述
Error
| 欄位 | 類型 | 說明 |
|---|---|---|
| error (必填) | object | |
| error.code (必填) | 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 (必填) | string | |
| error.reason | string | 搭配 `invalid_handle`、`invalid_listing`、`conflict` 和 `forbidden`:例如 `reserved`、`taken`、`too_long`、`no_handle`、`suspended`。 |
| error.url | string, uri | 搭配 consent_required:開啓此控制台頁面以授權編輯個人檔案。 |
| error.field | string | 搭配 `invalid_listing`:遭拒絕的欄位。 |
| error.scope | string | 搭配 `insufficient_scope`:權杖缺少的範圍。 |
| error.parameter | string | 無效的查詢參數。 |
| error.retryAfterSeconds | integer (1–) | 搭配 `rate_limited`。 |
Resolution
| 欄位 | 類型 | 說明 |
|---|---|---|
| handle (必填) | string | |
| did (必填) | string |