getMe
Check the token and retrieve the authenticated bot identity.
No required parameters.
Returns User with id, is_bot, first_name and username.
Build bots that receive updates, respond to messages, and work in AtlasChat groups and channels.
/newbot and follow the prompts to choose a display name and a username ending in bot./token @yourbot for a new one. Save the token in your server’s secret store and expose it to your app as ATLAS_BOT_TOKEN.export BOT_API="https://atlaspixel.ir/bot${ATLAS_BOT_TOKEN}"
curl --fail-with-body "$BOT_API/getMe"{
"ok": true,
"result": {
"id": 123456789,
"is_bot": true,
"first_name": "Build Bot",
"username": "build_bot"
}
}Use /mybots to list your bots and /cancel to cancel a setup in progress. To edit a profile, use /setname @yourbot | New name or /setdescription @yourbot | New description. Use /revoke @yourbot to disable a leaked token. Issuing a token with /token invalidates the previous one.
Call a method at the HTTPS URL below. Use GET query parameters for simple lookups, POST JSON for structured data, or multipart form data for file uploads. Methods that accept simple fields also support URL-encoded form inputs. Use POST for operations that change state.
https://atlaspixel.ir/bot<TOKEN>/<METHOD>Success responses contain ok: true and a result. API errors contain ok: false, an integer error_code, and a human-readable description. Keep the full request URL out of logs because its path contains the token.
| Status | Meaning | What to check |
|---|---|---|
| 400 | Invalid parameters or target | Check input types, chat and message IDs, file limits, or callback expiry. |
| 401 | Unauthorized | Check whether the token was revoked or replaced. |
| 403 | Forbidden | Check chat access, membership and posting rights. |
| 404 | Unknown method or file route | Check the method against the reference below. |
| 409 | Webhook active | Call deleteWebhook before polling. |
| 500 | Server error | Back off. After an ambiguous send failure, check whether the message arrived before retrying. |
Each update contains an update_id and one event field. Use the update ID to deduplicate retries. Pending update payloads are retained for up to 24 hours.
| Field | When it arrives |
|---|---|
message | Private text and supported attachments, or slash commands in a group or supergroup. Use /command@yourbot to target a specific bot. Topic commands include message_thread_id. |
channel_post | A text post in a broadcast channel the bot has joined. Use sender_chat for channel attribution. |
callback_query | A press on a callback-data button. Read id, data, from and the original message. |
Send your bot a message in AtlasChat, then call getUpdates. Save the last processed ID and request offset = last_processed_id + 1 after processing succeeds. Leave your HTTP client enough time for the server’s long poll.
curl --fail-with-body "$BOT_API/getUpdates?timeout=30&limit=20"{
"update_id": 501,
"message": {
"message_id": 27,
"date": 1796100000,
"from": {
"id": 123456789,
"is_bot": false,
"first_name": "Nina"
},
"chat": {
"id": 123456789,
"type": "private"
},
"text": "/start"
}
}Register a public HTTPS endpoint. AtlasChat sends one update as a JSON POST and adds X-Telegram-Bot-Api-Secret-Token if you supplied a secret. Validate the header, durably accept or deduplicate the update, then return a 2xx promptly. Failed deliveries are retried. Use port 443, 80, 88 or 8443 with HTTPS and a trusted certificate. Call getWebhookInfo to inspect the pending count and last failure time.
curl --fail-with-body "$BOT_API/setWebhook" \
--data-urlencode "url=https://bots.example.com/incoming" \
--data-urlencode "secret_token=$ATLAS_WEBHOOK_SECRET"Polling and webhooks are mutually exclusive. When switching, set drop_pending_updates only if you intend to discard the existing queue.
Replace the sample ID with message.chat.id from an update, or use channel_post.chat.id for a channel. Each button takes one HTTP(S) url or callback_data of 1–64 UTF-8 bytes. For callback buttons, send answerCallbackQuery with the update’s callback ID.
curl --fail-with-body "$BOT_API/sendMessage" \
-H "Content-Type: application/json" \
-d '{"chat_id":123456789,"text":"Build complete.",
"reply_markup":{"inline_keyboard":[[
{"text":"Acknowledge","callback_data":"ack:build-42"}
]]}}'Use the multipart field matching the method. Save the returned attachment’s file_id if you need to download it later. Call getFile, then fetch https://atlaspixel.ir/file/bot<TOKEN>/<file_path> with the same bot’s token. For forum destinations, pass message_thread_id as an additional form field.
curl --fail-with-body "$BOT_API/sendDocument" \
-F "chat_id=123456789" \
-F "document=@./report.pdf" \
-F "caption=Latest build report"Register command names without the slash. In your handler, match the text with the slash and route the associated update to your application code.
curl --fail-with-body "$BOT_API/setMyCommands" -H "Content-Type: application/json" -d '{"commands":[{"command":"start","description":"Start the bot"}]}'Configure both the API and file base URLs. For example, with python-telegram-bot, use the following configuration and keep the requested methods within the reference below.
import asyncio
import os
from telegram import Bot
async def main():
async with Bot(
token=os.environ["ATLAS_BOT_TOKEN"],
base_url="https://atlaspixel.ir/bot",
base_file_url="https://atlaspixel.ir/file/bot",
) as bot:
me = await bot.get_me()
print(f"Connected as @{me.username}")
asyncio.run(main())getMeCheck the token and retrieve the authenticated bot identity.
No required parameters.
Returns User with id, is_bot, first_name and username.
getChatRetrieve details for a private chat, group, supergroup or channel the bot can access.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
Returns Chat details, including id and type. Names, titles and usernames depend on the chat.
getChatMemberRead the status and applicable permissions of a member. Make the bot an administrator to look up other members in groups or channels.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
user_id | integer | Required | The AtlasChat user ID. Use the bot’s getMe ID to check its own membership. |
Returns Chat member object with user, status and applicable permission flags.
sendMessageSend a plain-text message. For private chats, the user must contact the bot first. Group and channel sends require the appropriate membership and posting rights.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
text | string | Required | Plain text, up to 4,096 Unicode characters. Whitespace-only text is rejected. |
message_thread_id | integer | Optional | A forum topic ID in the target supergroup. Omit to use the default conversation. |
reply_markup | object | Optional | An inline_keyboard with URL or callback-data buttons. For multipart uploads, send the object as JSON text. |
Returns Message with message_id, date, chat and text.
editMessageTextReplace the text of an eligible message. AtlasChat checks authorship and applicable channel permissions.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
message_id | integer | Required | The message ID in the target chat. Save it from the original response or update. |
text | string | Required | Plain text, up to 4,096 Unicode characters. Whitespace-only text is rejected. |
reply_markup | object | Optional | An inline_keyboard with URL or callback-data buttons. For multipart uploads, send the object as JSON text. |
Returns The edited Message.
editMessageReplyMarkupReplace or clear just the inline keyboard on an eligible message. Omit reply_markup or supply an empty inline_keyboard to clear it.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
message_id | integer | Required | The message ID in the target chat. Save it from the original response or update. |
reply_markup | object | Optional | An inline_keyboard with URL or callback-data buttons. For multipart uploads, send the object as JSON text. |
Returns The edited Message.
deleteMessageDelete an eligible message. AtlasChat checks authorship and applicable channel permissions.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
message_id | integer | Required | The message ID in the target chat. Save it from the original response or update. |
Returns true on success.
sendPhotoUpload a local file with multipart/form-data.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
photo | file | Required | JPEG or PNG, up to 10 MiB. |
caption | string | Optional | Plain text, up to 1,024 characters and 4,000 UTF-8 bytes. |
message_thread_id | integer | Optional | A forum topic ID in the target supergroup. Omit to use the default conversation. |
reply_markup | object | Optional | An inline_keyboard with URL or callback-data buttons. For multipart uploads, send the object as JSON text. |
Returns Message with the uploaded attachment, including its bot-scoped file_id.
sendDocumentUpload a local file with multipart/form-data.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
document | file | Required | A document up to 50 MiB. |
caption | string | Optional | Plain text, up to 1,024 characters and 4,000 UTF-8 bytes. |
message_thread_id | integer | Optional | A forum topic ID in the target supergroup. Omit to use the default conversation. |
reply_markup | object | Optional | An inline_keyboard with URL or callback-data buttons. For multipart uploads, send the object as JSON text. |
Returns Message with the uploaded attachment, including its bot-scoped file_id.
sendAudioUpload a local file with multipart/form-data.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
audio | file | Required | MP3 or M4A, up to 50 MiB. |
caption | string | Optional | Plain text, up to 1,024 characters and 4,000 UTF-8 bytes. |
message_thread_id | integer | Optional | A forum topic ID in the target supergroup. Omit to use the default conversation. |
reply_markup | object | Optional | An inline_keyboard with URL or callback-data buttons. For multipart uploads, send the object as JSON text. |
duration | integer | Optional | Audio duration in seconds. |
title | string | Optional | Track title, up to 256 UTF-8 bytes. |
performer | string | Optional | Artist or performer, up to 256 UTF-8 bytes. |
Returns Message with the uploaded attachment, including its bot-scoped file_id.
sendVideoUpload a local file with multipart/form-data.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
chat_id | integer or string | Required | A numeric chat ID or an @username for a public channel or supergroup. |
video | file | Required | MP4, up to 50 MiB. |
caption | string | Optional | Plain text, up to 1,024 characters and 4,000 UTF-8 bytes. |
message_thread_id | integer | Optional | A forum topic ID in the target supergroup. Omit to use the default conversation. |
reply_markup | object | Optional | An inline_keyboard with URL or callback-data buttons. For multipart uploads, send the object as JSON text. |
duration | integer | Optional | Video duration in seconds. |
width | integer | Optional | Video width in pixels. |
height | integer | Optional | Video height in pixels. |
supports_streaming | boolean | Optional | Set when the uploaded video is prepared for streaming. |
Returns Message with the uploaded attachment, including its bot-scoped file_id.
getFileResolve a file ID returned to this bot. Download the file by appending file_path to the authenticated file URL.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
file_id | string | Required | Use file_id from the attachment object. The file_unique_id field is an identifier for comparison. |
Returns File metadata with file_id, file_unique_id, file_size and file_path.
getUpdatesRead pending updates. Use one polling worker per bot and persist your offset.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
offset | integer | Optional | Pass the highest successfully processed update_id plus one. Earlier IDs are acknowledged. Defaults to 0. |
limit | integer | Optional | Batch size from 1 to 100. Defaults to 100. |
timeout | integer | Optional | Long poll duration from 0 to 50 seconds. Defaults to 0. |
Returns Array of Update objects, which can be empty. Returns HTTP 409 while a webhook is active.
setWebhookSwitch delivery to HTTPS POST. Use a public address with a trusted TLS certificate. Redirects and private network destinations are blocked.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
url | string | Required | Public HTTPS receiver URL. An empty string disables delivery. |
secret_token | string | Optional | Use a random 1–256 character value containing letters, digits, underscores or hyphens. |
drop_pending_updates | boolean | Optional | Discard the queued updates when switching delivery mode. Defaults to false. |
Returns true after saving the configuration. Send a test update to verify the receiver.
getWebhookInfoInspect the saved webhook configuration and delivery health.
No required parameters.
Returns WebhookInfo with url, pending_update_count, has_custom_certificate and last_error_date when available.
deleteWebhookRemove the webhook and return to polling.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
drop_pending_updates | boolean | Optional | Discard the queued updates when switching delivery mode. Defaults to false. |
Returns true on success.
setMyCommandsReplace the bot’s chat-bar command menu.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
commands | array | Required | Up to 100 entries with command (1–32 lowercase letters, digits or underscores, without the slash) and description (1–256 characters). Names must be unique. |
scope | object | Optional | Use {"type":"default"} or omit. |
Returns true on success.
getMyCommandsRead the default command menu.
No required parameters.
Returns Array of command and description pairs.
deleteMyCommandsClear the default command menu.
No required parameters.
Returns true on success.
answerCallbackQueryAcknowledge a button press promptly. A callback ID can be answered once.
| Parameter | Type | Requirement | Description |
|---|---|---|---|
callback_query_id | string | Required | The id property under callback_query. |
text | string | Optional | Client feedback, up to 200 characters. |
show_alert | boolean | Optional | Display the feedback as an alert. Defaults to false. |
Returns true on success.
This reference lists the supported AtlasChat methods. Message text and captions use plain text. File sending requires a fresh multipart upload. The command menu supports the default scope. Update filtering by allowed_updates is unavailable, so filter events in your application.
Inline queries, payments, Mini Apps, business connections, bulk message mutations, sticker and poll methods, forwarding, reactions and pinning are outside the current API. AtlasChat’s messenger may offer features that are unavailable to bots.