API

Chat read

Read chat and member info; bot must be an active participant.

Auth: Authorization: Bearer sbot_…

GET/api/v1/bots/getMyChats
Bot Token

getMyChats

List chats where the bot is an active participant (useful when webhook history is incomplete).

  • Optional query: type (group / private, default all), limit (1–500, default 200)
  • Returns: { chats: [{ chat_id, type, title, member_role?, updated_at? }], total }
GET/api/v1/bots/getChat
Bot Token

getChat

Query basic info for one private or group chat; the bot must be an active participant.

  • Required query:chat_id(会话 ID)
  • Returns:{ id, type, title?, name?, member_count?, pinned_message_id? }
GET/api/v1/bots/getChatMember
Bot Token

getChatMember

查询群内某成员的状态;返回成员资料、所在角色与权限。

  • Required query:chat_iduser_id
  • Returns:{ user: { id, username?, first_name?, is_bot }, status }
GET/api/v1/bots/getChatMemberCount
Bot Token

getChatMemberCount

获取群成员人数。

  • Required query:chat_id
  • Returns:{ count }
GET/api/v1/bots/getChatAdministrators
Bot Token

getChatAdministrators

群管理员(含群主)列表。

  • Required query:chat_id
  • Returns:administrators[](每项含 userstatus