你的機械人
GET/me/bots
你帳號中的所有機械人,無論是否列入目錄,由舊到新排列。請從控制台新增機械人:需要以機械人帳號登入。
回應
| 狀態碼 | 說明 | 內容 |
|---|---|---|
| 200 | 你的機械人。 | MyBotList |
| 401 | 權杖遺失、已過期或已撤銷(代碼 `unauthorized`)。請重新執行 `bsbot login`。 | Error |
| 403 | 權杖缺少 `handles` 範圍,或已綁定到單一機械人(`insufficient_scope`)。 | 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結構描述
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`。 |
MyBot
| 欄位 | 類型 | 說明 |
|---|---|---|
| did (必填) | string | |
| handle (必填) | string | null | 已領取的 `*.bluesky.bot` 帳號代碼;沒有時為 null。 |
| previousHandle (必填) | string | null | 機械人在此領取帳號代碼之前的帳號代碼。 |
| displayName (必填) | string | null | |
| avatar (必填) | string | null | |
| verifiedAt (必填) | string | null, date-time | 已領取的帳號代碼確認在 Bluesky 上啓用的時間。 |
| listed (必填) | boolean | 顯示在公開目錄中。 |
| status (必填) | string: "active", "suspended" | |
| selfLabeled (必填) | boolean | null | Bluesky 在機械人的個人檔案上顯示「自動化」標記:機械人設定了自己的 `bot` 自我標記(在 Bluesky App 中:「設定」→「帳號」→「加入自動化標記到此帳號」)。從其公開個人檔案讀取,已領取帳號代碼的機械人至少每天讀取一次;從未讀取時為 null。 |
MyBotList
| 欄位 | 類型 | 說明 |
|---|---|---|
| bots (必填) | MyBot[] |