---
title: "Get exact messages"
method: POST
path: "/bot{token}/getMessages"
tags: ["Bot"]
---

# Get exact messages

`POST /bot{token}/getMessages`

Returns up to 100 requested messages from one accessible chat, in request order.

## Path parameters

- `token` string, required

## Headers

- `authorization` string

## Request body

- GetMessagesInput — Selects up to 100 exact messages in one conversation.
  - `user_id` integer — Target a private conversation with this user. Supply exactly one of user_id or chat_id.
  - `chat_id` integer — Target this chat. Supply exactly one of chat_id or user_id.
  - `message_ids` MessageId[], required

## Response `200`

Successful exact-message read or search response.

- BotMessagesSuccess — unresolved $ref

## Other responses

- `400` — The request parameters are missing or invalid.
- `401` — The bot token is missing or invalid.
- `403` — The bot is not allowed to perform this action.
- `404` — The requested method or resource was not found.
- `500` — The server could not complete the request.

## Changes

- **2026-08-28** `69017b8dc5fe` — 5 breaking, 11 warning, 8 info
  - the response property `result/allOf[#/components/schemas/BotMessagesResult]/messages/items/chat` became optional for the status `200`
  - the response property `result/allOf[#/components/schemas/BotMessagesResult]/messages/items/chat_id` became optional for the status `200`
  - the response property `result/allOf[#/components/schemas/BotMessagesResult]/messages/items/peer` became optional for the status `200`
  - the `result/allOf[#/components/schemas/BotMessagesResult]/messages/items/chat` response's property type/format changed from `object`/`` to ``/`` for status `200`
  - …20 more
- …earlier changes not shown

[Full history](https://skmtc.dev/inline/apis/inline-bot-http-api-docs/changes/bot:token/getMessages/post.md)

---

[API](https://skmtc.dev/inline/apis/inline-bot-http-api-docs.md) · [All operations](https://skmtc.dev/inline/apis/inline-bot-http-api-docs/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/inline/inline-bot-http-api-docs/revisions/69017b8dc5fe/schema)
