List Bot Chats
GET
/v1/bots/{bot_id}/chats
const url = 'https://api.cloud.agentums.ru/v1/bots/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/chats';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.cloud.agentums.ru/v1/bots/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/chats \ --header 'Authorization: Bearer <token>'Группы, в которых живёт бот. Наполняются сами из апдейтов — список чатов Telegram не отдаёт.
Authorizations
Заголовок раздела «Authorizations»Parameters
Заголовок раздела «Parameters»Path Parameters
Заголовок раздела «Path Parameters»bot_id
required
Bot Id
string format: uuid
Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
BotChatListOut
object
items
Items
Array<object>
BotChatOutКарточка группы для экрана владельца.
member_count и known_count идут ПАРОЙ намеренно. Состав группы Telegram боту не
отдаёт (есть только getChatAdministrators и getChatMember по уже известному id), поэтому
реестр неполон всегда. Одно known_count выдало бы четверых известных за всю группу —
интерфейс обязан показывать «знаем 4 из 12», а не «4 участника».
object
chat_id
required
Chat Id
integer
collection_id
Collection Id
string
description
Description
string
known_count
Known Count
integer
last_seen_at
Last Seen At
string
member_count
Member Count
integer
note_object_id
Note Object Id
string
synced_at
Synced At
string
title
required
Title
string
Example
{ "items": [ { "collection_id": "", "description": "", "known_count": 0, "last_seen_at": "", "member_count": 0, "note_object_id": "", "synced_at": "" } ]}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}