讀取已授權的機械人能力
GET/me/bots/{did}/capabilities/{capability}
使用已啓用、且經明確授權的機械人專屬 tools 權杖,讀取個人檔案、跟隨者、跟隨中、統計資料或狀態。與 MCP 的 read_bot_capability 使用相同的處理程序。不提供任何寫入,也不提供跟隨者身份。
參數
| 名稱 | 位置 | 類型 | 說明 |
|---|---|---|---|
| did (必填) | path | string | 與此能力權杖綁定的確切機械人 DID。 |
| capability (必填) | path | string: "profile", "followers", "following", "statistics", "status" | 一項允許的讀取能力。 |
回應
| 狀態碼 | 說明 | 內容 |
|---|---|---|
| 200 | 目前的公開資料,或明確的無法取得狀態。 | BotCapabilityResult |
| 400 | 請求無效,或不支援的能力。 | Error |
| 401 | 權杖遺失、已過期或已撤銷(代碼 `unauthorized`)。請重新執行 `bsbot login`。 | Error |
| 403 | 此權杖沒有機械人專屬的能力授權。 | Error |
| 404 | 你的帳號中沒有這個機械人,或這是機械人的帳號代碼子網域(API 僅在主站提供)。 | Error |
| 429 | 已達速率限制:`publicApi` 依 IP、`creatorApi` 依帳號,而領取、切換、檢查和釋出則適用依帳號計算的 `handleChange`(與控制台共用)。 | Error |
| 500 | 未預期的錯誤。 | Error |
範例
curl \
-H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
"https://bluesky.bot/api/v1/me/bots/did:plc:yourbot/capabilities"\
"/followers"結構描述
BotCapabilityResult
| 欄位 | 類型 | 說明 |
|---|---|---|
| did (必填) | string | |
| capability (必填) | string: "profile", "followers", "following", "statistics", "status" | |
| availability (必填) | string: "available", "unavailable" | |
| source (必填) | string = "public_appview" | |
| observedAt (必填) | string | null | |
| maxAgeSeconds (必填) | number = 300 | |
| data (必填) | object | null |
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`。 |