設定機械人的「自動化」標記

POST/me/bots/{did}/automation-label

只會變更個人檔案上的機械人自我標記。需要 CLI 權杖,且事先已在機械人的控制台同意編輯個人檔案。

參數

名稱位置類型說明
did (必填)pathstring機械人的 DID,與 `GET /me/bots` 列出的相同。

回應

狀態碼說明內容
200標記已寫入,或原本就處於所要求的狀態。
400傳送一個只含一個布林欄位的 JSON 物件:on。Error
401權杖遺失、已過期或已撤銷(代碼 `unauthorized`)。請重新執行 `bsbot login`。Error
403機械人已被停權(`forbidden`),或權杖缺少 `handles` 範圍或已綁定到單一機械人(`insufficient_scope`)。Error
404你的帳號中沒有這個機械人,或這是機械人的帳號代碼子網域(API 僅在主站提供)。Error
409需要同意編輯個人檔案:請開啓 error.url 中的控制台網址。Error
429已達速率限制:`publicApi` 依 IP、`creatorApi` 依帳號,而領取、切換、檢查和釋出則適用依帳號計算的 `handleChange`(與控制台共用)。Error
500未預期的錯誤。Error
502機械人的伺服器無法套用此標記。Error

範例

bash
curl \
  -X POST \
  -H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
  https://bluesky.bot/api/v1/me/bots/did:plc:yourbot/automation-label

結構描述

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.reasonstring搭配 `invalid_handle`、`invalid_listing`、`conflict` 和 `forbidden`:例如 `reserved`、`taken`、`too_long`、`no_handle`、`suspended`。
error.urlstring, uri搭配 consent_required:開啓此控制台頁面以授權編輯個人檔案。
error.fieldstring搭配 `invalid_listing`:遭拒絕的欄位。
error.scopestring搭配 `insufficient_scope`:權杖缺少的範圍。
error.parameterstring無效的查詢參數。
error.retryAfterSecondsinteger (1–)搭配 `rate_limited`。