### Environment Configuration for Teletest API Source: https://context7.com/dexoon/teletest-api/llms.txt Guides users on setting up the Telegram API credentials and optional debugging flags for the Teletest API service. It involves copying an example .env file, editing it with user credentials, generating a session string using a Python script, and finally running the main service. ```bash # Copy example configuration cp .env.example .env # Edit .env with your credentials # API_ID=1234567 # API_HASH=your_api_hash_here # SESSION_STRING=your_session_string_here # DEBUG=0 # VERBOSE=0 # Generate session string python generate_session.py # Follow prompts to log in with phone number # Copy the output session string to .env # Run the service python main.py # Service starts on http://0.0.0.0:8000 ``` -------------------------------- ### Install Python client dependency Source: https://github.com/dexoon/teletest-api/blob/main/README.md This command installs the 'requests' library, which is a prerequisite for using the synchronous Python client for the teletest-api. ```bash pip install requests ``` -------------------------------- ### TypeScript client usage example Source: https://github.com/dexoon/teletest-api/blob/main/README.md This example demonstrates how to instantiate the TeletestApiClient in TypeScript and send a message to a bot, then log the bot's response. It shows a basic interaction flow with the API. ```typescript import TeletestApiClient from "teletest-api-client"; const client = new TeletestApiClient("http://localhost:8000"); client.sendMessage({ bot_username: "mybot", message_text: "/ping" }).then((responses) => { console.log(responses[0].message_text); }); ``` -------------------------------- ### Python client usage example Source: https://github.com/dexoon/teletest-api/blob/main/README.md This example shows how to initialize the TeletestApiClient in Python and send a message using the SendMessageRequest object. It then prints the text of the first response received from the bot. ```python from clients.python_client import TeletestApiClient, SendMessageRequest client = TeletestApiClient("http://localhost:8000") responses = client.send_message(SendMessageRequest(bot_username="mybot", message_text="/ping")) print(responses[0].message_text) ``` -------------------------------- ### Build TypeScript client Source: https://github.com/dexoon/teletest-api/blob/main/README.md These commands navigate to the TypeScript client directory, install its dependencies, and build the client. This prepares the client for usage in a TypeScript project. ```bash cd clients/ts-client npm install npm run build ``` -------------------------------- ### Set up environment variables with .env file Source: https://github.com/dexoon/teletest-api/blob/main/README.md This snippet demonstrates how to copy the example environment file and edit it with your Telegram API credentials. It highlights the required variables: API_ID, API_HASH, and SESSION_STRING, and optional ones like DEBUG and VERBOSE. ```bash cp .env.example .env # Now edit .env with your credentials ``` -------------------------------- ### Run teletest-api service with Python Source: https://github.com/dexoon/teletest-api/blob/main/README.md This command starts the teletest-api FastAPI service using Python. Ensure all required environment variables are set before running. ```bash python main.py ``` -------------------------------- ### Python Library Integration for Bot Testing Source: https://context7.com/dexoon/teletest-api/llms.txt Example of using the Teletest API client in Python with pytest for automated bot testing. It demonstrates testing bot responses to commands and button interactions. Requires pytest and the teletest-api-client library. ```python import pytest from clients.python_client.teletest_api_client import ( TeletestApiClient, SendMessageRequest ) @pytest.fixture async def api_client(): async with TeletestApiClient("http://localhost:8000") as client: yield client @pytest.mark.asyncio async def test_bot_start_command(api_client): """Test bot responds to /start command""" request = SendMessageRequest( bot_username="@mybot", message_text="/start", timeout_sec=5 ) responses = await api_client.send_message(request) assert len(responses) > 0 assert responses[0].message_text is not None assert "Welcome" in responses[0].message_text @pytest.mark.asyncio async def test_bot_button_interaction(api_client): """Test bot button press flow""" # Send initial command start_request = SendMessageRequest( bot_username="@mybot", message_text="/menu" ) start_responses = await api_client.send_message(start_request) # Verify buttons are present assert start_responses[0].reply_markup is not None assert len(start_responses[0].reply_markup) > 0 # Press first button first_button = start_responses[0].reply_markup[0][0] button_request = PressButtonRequest( bot_username="@mybot", callback_data=first_button.callback_data ) button_responses = await api_client.press_button(button_request) # Verify response assert len(button_responses) > 0 assert button_responses[0].message_text is not None ``` -------------------------------- ### GET /get-updates Source: https://context7.com/dexoon/teletest-api/llms.txt An alias endpoint for retrieving recent messages, defaulting to fetching the last 10 messages. ```APIDOC ## GET /get-updates ### Description An alias endpoint for retrieving recent messages from the conversation with a specified bot. It defaults to fetching the last 10 messages if the `limit` parameter is not provided. ### Method GET ### Endpoint /get-updates ### Parameters #### Query Parameters - **bot_username** (string) - Required - The username of the target Telegram bot (e.g., "@mybot"). - **limit** (integer) - Optional - The maximum number of recent messages to retrieve. Defaults to 10 if not specified. #### Headers - **X-Telegram-Api-Id** (string) - Optional - Your Telegram API ID for custom authentication. - **X-Telegram-Api-Hash** (string) - Optional - Your Telegram API Hash for custom authentication. - **X-Telegram-Session-String** (string) - Optional - Your Telegram session string for custom authentication. ### Request Example ``` http://localhost:8000/get-updates?bot_username=@mybot&limit=10 ``` ### Response #### Success Response (200) An object containing an array of recent messages in chronological order (oldest first). The format is identical to the `/get-messages` endpoint. - **messages** (array) - An array of message objects. - **response_type** (string) - The type of the response, typically "message". - **message_id** (integer) - The unique identifier of the message. - **message_text** (string) - The text content of the message. - **reply_markup** (object or null) - The reply markup of the message. - **reply_keyboard** (boolean) - Indicates if the message includes a reply keyboard. #### Response Example ```json { "messages": [ { "response_type": "message", "message_id": 12340, "message_text": "/start", "reply_markup": null, "reply_keyboard": false }, { "response_type": "message", "message_id": 12341, "message_text": "Welcome to the bot!", "reply_markup": [ [{"text": "Get Started", "callback_data": "start"}] ], "reply_keyboard": false } ] } ``` ``` -------------------------------- ### TypeScript Testing Integration for Bot Testing Source: https://context7.com/dexoon/teletest-api/llms.txt Example of integrating the Teletest API client into TypeScript testing frameworks like Jest. It covers testing bot command responses and button interactions. Requires the 'teletest-api-client' npm package. ```typescript import TeletestApiClient, { SendMessageRequest } from 'teletest-api-client'; describe('Bot Integration Tests', () => { let client: TeletestApiClient; beforeAll(() => { client = new TeletestApiClient('http://localhost:8000'); }); test('bot responds to start command', async () => { const request: SendMessageRequest = { bot_username: '@mybot', message_text: '/start', timeout_sec: 5 }; const responses = await client.sendMessage(request); expect(responses).toHaveLength(1); expect(responses[0].message_text).toContain('Welcome'); }); test('bot button interaction flow', async () => { // Send command that shows buttons const menuRequest: SendMessageRequest = { bot_username: '@mybot', message_text: '/menu', timeout_sec: 5 }; const menuResponses = await client.sendMessage(menuRequest); // Verify buttons exist expect(menuResponses[0].reply_markup).toBeDefined(); expect(menuResponses[0].reply_markup!.length).toBeGreaterThan(0); // Press the first button const firstButton = menuResponses[0].reply_markup![0][0]; const buttonResponses = await client.pressButton({ bot_username: '@mybot', callback_data: firstButton.callback_data!, timeout_sec: 5 }); // Verify response after button press expect(buttonResponses).toHaveLength(1); expect(buttonResponses[0].message_text).toBeDefined(); }); }); ``` -------------------------------- ### Get Messages API Source: https://github.com/dexoon/teletest-api/blob/main/README.md Fetches recent messages from the chat history with a specific bot. ```APIDOC ## GET /get-messages ### Description Fetches recent messages from the chat with the bot. ### Method GET ### Endpoint /get-messages ### Parameters #### Query Parameters - **bot_username** (string) - Required - The username of the bot whose messages you want to fetch. - **limit** (integer) - Optional - The maximum number of messages to retrieve. Defaults to 10. ### Request Example ``` GET /get-messages?bot_username=your_bot_username&limit=5 ``` ### Response #### Success Response (200) - **messages** (array) - A list of recent message objects from the chat. - **message_text** (string) - The content of the message. - **sender_username** (string) - The username of the sender. #### Response Example ```json { "messages": [ { "message_text": "Hello there!", "sender_username": "your_bot_username" }, { "message_text": "How can I help you?", "sender_username": "your_bot_username" } ] } ``` ``` -------------------------------- ### GET /get-messages Source: https://context7.com/dexoon/teletest-api/llms.txt Fetches the last N messages from the conversation with a specified bot without sending any new messages. ```APIDOC ## GET /get-messages ### Description Fetches the last N messages from the conversation with a specified bot without sending any new messages. This endpoint is useful for reviewing conversation history or checking bot state. ### Method GET ### Endpoint /get-messages ### Parameters #### Query Parameters - **bot_username** (string) - Required - The username of the target Telegram bot (e.g., "@mybot"). - **limit** (integer) - Required - The maximum number of recent messages to retrieve. #### Headers - **X-Telegram-Api-Id** (string) - Optional - Your Telegram API ID for custom authentication. - **X-Telegram-Api-Hash** (string) - Optional - Your Telegram API Hash for custom authentication. - **X-Telegram-Session-String** (string) - Optional - Your Telegram session string for custom authentication. ### Request Example ``` http://localhost:8000/get-messages?bot_username=@mybot&limit=5 ``` ### Response #### Success Response (200) An object containing an array of recent messages in chronological order (oldest first). - **messages** (array) - An array of message objects. - **response_type** (string) - The type of the response, typically "message". - **message_id** (integer) - The unique identifier of the message. - **message_text** (string) - The text content of the message. - **reply_markup** (object or null) - The reply markup of the message. - **reply_keyboard** (boolean) - Indicates if the message includes a reply keyboard. #### Response Example ```json { "messages": [ { "response_type": "message", "message_id": 12340, "message_text": "/start", "reply_markup": null, "reply_keyboard": false }, { "response_type": "message", "message_id": 12341, "message_text": "Welcome to the bot!", "reply_markup": [ [{"text": "Get Started", "callback_data": "start"}] ], "reply_keyboard": false } ] } ``` ``` -------------------------------- ### Get Recent Updates (REST API) Source: https://context7.com/dexoon/teletest-api/llms.txt An alias endpoint for retrieving recent messages, defaulting to fetching the last 10 messages. It functions identically to the 'get-messages' endpoint but with a default limit of 10. Supports bot username and limit parameter, and custom Telegram credentials. ```bash curl "http://localhost:8000/get-updates?bot_username=@mybot&limit=10" ``` -------------------------------- ### Build and run teletest-api service with Docker Source: https://github.com/dexoon/teletest-api/blob/main/README.md These Docker commands build the teletest-api image from the Dockerfile and run it as a container, exposing port 8000. It also shows how to pass environment variables directly during runtime. ```bash docker build -t teletest-api . docker run -p 8000:8000 \ -e API_ID=... \ -e API_HASH=... \ -e SESSION_STRING=... teletest-api ``` -------------------------------- ### Docker Deployment and Execution of Teletest API Source: https://context7.com/dexoon/teletest-api/llms.txt Instructions to pull the Teletest API Docker image from GitHub Container Registry and run it with necessary environment variables. Ensure to replace placeholder values for API ID, API Hash, and Session String. ```shell docker pull ghcr.io/dexoon/teletest-api:latest docker run -p 8000:8000 \ -e API_ID=1234567 \ -e API_HASH=your_api_hash \ -e SESSION_STRING=your_session_string \ ghcr.io/dexoon/teletest-api:latest ``` -------------------------------- ### Enable and run real bot tests Source: https://github.com/dexoon/teletest-api/blob/main/README.md To run tests against a live Telegram bot, you need to provide specific credentials including API_ID, API_HASH, SESSION_STRING, and TEST_BOT_TOKEN. Setting the RUN_REAL_BOT_TESTS environment variable to '1' enables these tests. ```bash # Set environment variables for credentials export API_ID=... export API_HASH=... export SESSION_STRING=... export TEST_BOT_TOKEN=... export RUN_REAL_BOT_TESTS=1 # Run the tests (assuming a test runner is set up) # Example: pytest ``` -------------------------------- ### Python Async Client for Teletest API Source: https://context7.com/dexoon/teletest-api/llms.txt An asynchronous Python client utilizing aiohttp for non-blocking interactions with the Teletest API. It demonstrates sending messages, pressing buttons, and retrieving message history. Dependencies include aiohttp and the teletest-api-client library. ```python import asyncio from clients.python_client.teletest_api_client import ( TeletestApiClient, SendMessageRequest, PressButtonRequest, TelegramCredentialsRequest ) async def test_bot(): # Initialize client async with TeletestApiClient("http://localhost:8000") as client: # Send message to bot request = SendMessageRequest( bot_username="@mybot", message_text="/start", timeout_sec=5 ) responses = await client.send_message(request) # Process first response first_response = responses[0] print(f"Bot replied: {first_response.message_text}") # Check for buttons if first_response.reply_markup: for row in first_response.reply_markup: for button in row: print(f"Button: {button.text} -> {button.callback_data}") # Press a button button_request = PressButtonRequest( bot_username="@mybot", callback_data="opt1", timeout_sec=5 ) button_responses = await client.press_button(button_request) print(f"After button press: {button_responses[0].message_text}") # Get message history history = await client.get_messages("@mybot", limit=10) print(f"Total messages in history: {len(history.messages)}") # Using custom Telegram credentials async def test_with_custom_creds(): creds = TelegramCredentialsRequest( api_id=1234567, api_hash="your_api_hash", session_string="your_session_string" ) async with TeletestApiClient("http://localhost:8000") as client: request = SendMessageRequest( bot_username="@testbot", message_text="/ping" ) responses = await client.send_message(request, creds=creds) print(responses[0].message_text) asyncio.run(test_bot()) ``` -------------------------------- ### Pull latest teletest-api Docker image Source: https://github.com/dexoon/teletest-api/blob/main/README.md This command pulls the latest teletest-api Docker image from GitHub Container Registry, allowing you to run the service using a pre-built image. ```bash docker pull ghcr.io/dexoon/teletest-api:latest ``` -------------------------------- ### Press Button API Source: https://github.com/dexoon/teletest-api/blob/main/README.md Presses an inline or reply keyboard button on behalf of the user. ```APIDOC ## POST /press-button ### Description Presses an inline or reply keyboard button. ### Method POST ### Endpoint /press-button ### Parameters #### Request Body - **bot_username** (string) - Required - The username of the target bot. - **button_text** (string) - Required - The text of the button to press. ### Request Example ```json { "bot_username": "your_bot_username", "button_text": "Click Me" } ``` ### Response #### Success Response (200) - **messages** (array) - A list of message objects received after pressing the button. - **message_text** (string) - The content of the message. - **sender_username** (string) - The username of the sender. #### Response Example ```json { "messages": [ { "message_text": "Button clicked!", "sender_username": "your_bot_username" } ] } ``` ``` -------------------------------- ### TypeScript Client for Teletest API Source: https://context7.com/dexoon/teletest-api/llms.txt A TypeScript/JavaScript client for the Teletest API using axios, providing full type definitions for robust development. It mirrors the Python client's functionality, allowing message sending, button interaction, and history retrieval. Requires the 'teletest-api-client' npm package. ```typescript import TeletestApiClient,{ SendMessageRequest, PressButtonRequest, TelegramCredentialsRequest } from 'teletest-api-client'; async function testBot() { const client = new TeletestApiClient('http://localhost:8000'); try { // Send message to bot const sendRequest: SendMessageRequest = { bot_username: '@mybot', message_text: '/start', timeout_sec: 5 }; const responses = await client.sendMessage(sendRequest); console.log(`Bot replied: ${responses[0].message_text}`); // Check for inline buttons if (responses[0].reply_markup) { responses[0].reply_markup.forEach((row) => { row.forEach((button) => { console.log(`Button: ${button.text} -> ${button.callback_data}`); }); }); } // Press a button const buttonRequest: PressButtonRequest = { bot_username: '@mybot', callback_data: 'opt1', timeout_sec: 5 }; const buttonResponses = await client.pressButton(buttonRequest); console.log(`After button press: ${buttonResponses[0].message_text}`); // Get message history const history = await client.getMessages('@mybot', 10); console.log(`Total messages: ${history.messages.length}`); } catch (error) { console.error('Error testing bot:', error); } } // Using custom credentials async function testWithCustomCreds() { const client = new TeletestApiClient('http://localhost:8000'); const creds: TelegramCredentialsRequest = { api_id: 1234567, api_hash: 'your_api_hash', session_string: 'your_session_string' }; const request: SendMessageRequest = { bot_username: '@testbot', message_text: '/ping' }; const responses = await client.sendMessage(request, creds); console.log(responses[0].message_text); } testBot(); ``` -------------------------------- ### Custom Telegram Credentials Source: https://github.com/dexoon/teletest-api/blob/main/README.md Allows providing custom Telegram API credentials via HTTP headers for specific requests. ```APIDOC ## Custom Telegram Credentials ### Description Custom Telegram credentials can be provided via HTTP headers to override the default credentials configured in the environment variables or `.env` file. ### Headers - **X-Telegram-Api-Id** (string) - Your custom API ID. - **X-Telegram-Api-Hash** (string) - Your custom API Hash. - **X-Telegram-Session-String** (string) - Your custom session string. ``` -------------------------------- ### POST /press-button Source: https://context7.com/dexoon/teletest-api/llms.txt Interacts with inline keyboard buttons or reply keyboard buttons on the most recent message from a bot. ```APIDOC ## POST /press-button ### Description Interacts with inline keyboard buttons or reply keyboard buttons on the most recent message from a bot. This allows for simulating user interaction with bot-generated interfaces. ### Method POST ### Endpoint /press-button ### Parameters #### Request Body - **bot_username** (string) - Required - The username of the target Telegram bot (e.g., "@mybot"). - **callback_data** (string) - Optional - The callback data of the inline button to press. - **button_text** (string) - Optional - The visible text of the reply keyboard button to press. Either `callback_data` or `button_text` must be provided. - **timeout_sec** (integer) - Required - The maximum time in seconds to wait for bot responses after pressing the button. #### Headers - **X-Telegram-Api-Id** (string) - Optional - Your Telegram API ID for custom authentication. - **X-Telegram-Api-Hash** (string) - Optional - Your Telegram API Hash for custom authentication. - **X-Telegram-Session-String** (string) - Optional - Your Telegram session string for custom authentication. ### Request Example ```json { "bot_username": "@mybot", "callback_data": "opt1", "timeout_sec": 5 } ``` ```json { "bot_username": "@mybot", "button_text": "Next Page", "timeout_sec": 5 } ``` ### Response #### Success Response (200) An array of message objects received from the bot as a result of the button press. - **response_type** (string) - The type of the response, typically "message". - **message_id** (integer) - The unique identifier of the message. - **message_text** (string) - The text content of the bot's message. - **reply_markup** (object or null) - The reply markup of the message, which can be an inline keyboard or null. - **reply_keyboard** (boolean) - Indicates if the message includes a reply keyboard. #### Response Example ```json [ { "response_type": "message", "message_id": 12346, "message_text": "You selected Option 1", "reply_markup": null, "reply_keyboard": false } ] ``` ``` -------------------------------- ### Generate Telegram Session String Source: https://github.com/dexoon/teletest-api/blob/main/README.md This Python script is a helper to generate the SESSION_STRING required for authentication. It prompts the user to log in and outputs the session string to be added to the .env file. ```python python generate_session.py ``` -------------------------------- ### Press Bot Button (REST API) Source: https://context7.com/dexoon/teletest-api/llms.txt Interacts with inline or reply keyboard buttons on the most recent bot message. Supports pressing by callback data or visible button text. Requires bot username, and either callback data or button text, along with a timeout. Returns messages triggered by the button press. ```bash curl -X POST http://localhost:8000/press-button \ -H "Content-Type: application/json" \ -d '{ "bot_username": "@mybot", "callback_data": "opt1", "timeout_sec": 5 }' ``` ```bash curl -X POST http://localhost:8000/press-button \ -H "Content-Type: application/json" \ -d '{ "bot_username": "@mybot", "button_text": "Next Page", "timeout_sec": 5 }' ``` -------------------------------- ### Reset Chat API Source: https://github.com/dexoon/teletest-api/blob/main/README.md Clears the entire dialog history with a specified bot. ```APIDOC ## POST /reset-chat ### Description Clears dialog history with the bot. ### Method POST ### Endpoint /reset-chat ### Parameters #### Request Body - **bot_username** (string) - Required - The username of the bot whose chat history to clear. ### Request Example ```json { "bot_username": "your_bot_username" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the chat history has been cleared. #### Response Example ```json { "message": "Chat history with your_bot_username has been cleared." } ``` ``` -------------------------------- ### Send Message to Bot (REST API) Source: https://context7.com/dexoon/teletest-api/llms.txt Sends a text message to a specified Telegram bot and collects all responses within a given timeout. Supports custom Telegram credentials via HTTP headers for multiple concurrent sessions. Requires bot username, message text, and timeout in seconds. ```bash curl -X POST http://localhost:8000/send-message \ -H "Content-Type: application/json" \ -d '{ "bot_username": "@mybot", "message_text": "/start", "timeout_sec": 5 }' ``` ```bash curl -X POST http://localhost:8000/send-message \ -H "Content-Type: application/json" \ -H "X-Telegram-Api-Id: 1234567" \ -H "X-Telegram-Api-Hash: your_api_hash" \ -H "X-Telegram-Session-String: your_session_string" \ -d '{ "bot_username": "@testbot", "message_text": "/help", "timeout_sec": 10 }' ``` -------------------------------- ### Send Message API Source: https://github.com/dexoon/teletest-api/blob/main/README.md Sends a text message to a specified bot and waits for a reply. ```APIDOC ## POST /send-message ### Description Sends a text message to a bot and waits for a reply. ### Method POST ### Endpoint /send-message ### Parameters #### Request Body - **bot_username** (string) - Required - The username of the target bot. - **message_text** (string) - Required - The text message to send. ### Request Example ```json { "bot_username": "your_bot_username", "message_text": "/start" } ``` ### Response #### Success Response (200) - **messages** (array) - A list of message objects received as a reply from the bot. - **message_text** (string) - The content of the message. - **sender_username** (string) - The username of the sender. #### Response Example ```json { "messages": [ { "message_text": "Welcome!", "sender_username": "your_bot_username" } ] } ``` ``` -------------------------------- ### Retrieve Recent Messages (REST API) Source: https://context7.com/dexoon/teletest-api/llms.txt Fetches the last N messages from a conversation with a bot without sending new messages. Allows specifying the bot username and the number of messages to retrieve (limit). Supports custom Telegram credentials via HTTP headers. Returns messages in chronological order. ```bash curl "http://localhost:8000/get-messages?bot_username=@mybot&limit=5" ``` ```bash curl "http://localhost:8000/get-messages?bot_username=@mybot&limit=10" \ -H "X-Telegram-Api-Id: 1234567" \ -H "X-Telegram-Api-Hash: your_api_hash" \ -H "X-Telegram-Session-String: your_session_string" ``` -------------------------------- ### POST /send-message Source: https://context7.com/dexoon/teletest-api/llms.txt Sends a text message to a specified Telegram bot and collects all responses received within a given timeout period. ```APIDOC ## POST /send-message ### Description Sends a text message to a specified Telegram bot and collects all responses received within a given timeout period. This endpoint is useful for initiating conversations or triggering bot actions. ### Method POST ### Endpoint /send-message ### Parameters #### Request Body - **bot_username** (string) - Required - The username of the target Telegram bot (e.g., "@mybot"). - **message_text** (string) - Required - The text content of the message to send. - **timeout_sec** (integer) - Required - The maximum time in seconds to wait for bot responses. #### Headers - **X-Telegram-Api-Id** (string) - Optional - Your Telegram API ID for custom authentication. - **X-Telegram-Api-Hash** (string) - Optional - Your Telegram API Hash for custom authentication. - **X-Telegram-Session-String** (string) - Optional - Your Telegram session string for custom authentication. ### Request Example ```json { "bot_username": "@mybot", "message_text": "/start", "timeout_sec": 5 } ``` ### Response #### Success Response (200) An array of message objects received from the bot within the specified timeout. - **response_type** (string) - The type of the response, typically "message". - **message_id** (integer) - The unique identifier of the message. - **message_text** (string) - The text content of the bot's message. - **reply_markup** (object or null) - The reply markup of the message, which can be an inline keyboard or null. - **reply_keyboard** (boolean) - Indicates if the message includes a reply keyboard. #### Response Example ```json [ { "response_type": "message", "message_id": 12345, "message_text": "Welcome! Please choose an option:", "reply_markup": [ [ {"text": "Option 1", "callback_data": "opt1"}, {"text": "Option 2", "callback_data": "opt2"} ] ], "reply_keyboard": false } ] ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.