你的机器人
GET/me/bots
你账户中的所有机器人,无论是否列入目录,最早的排在最前。请在控制台中添加机器人:这需要用机器人账户登录。
响应
| 状态码 | 描述 | 正文 |
|---|---|---|
| 200 | 你的机器人。 | MyBotList |
| 401 | 令牌缺失、已过期或已撤销(代码 `unauthorized`)。请重新运行 `bsbot login`。 | Error |
| 403 | 令牌缺少 `handles` 范围,或绑定到了单个机器人(`insufficient_scope`)。 | Error |
| 404 | 你的账户中没有这个机器人,或这是机器人的账户代码子域名(API 仅在主站点提供)。 | Error |
| 429 | 已限速:按 IP 的 `publicApi`、按账户的 `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 应用中:“设置” → “账户” → “添加自动化标记至此账户”)。从其公开个人资料读取,已领取账户代码的机器人至少每天读取一次;从未读取时为 null。 |
MyBotList
| 字段 | 类型 | 描述 |
|---|---|---|
| bots (必填) | MyBot[] |