A simple method for testing your bot's auth token

POST /getMe

A simple method for testing your bot's auth token. Requires no parameters. Returns basic information about the bot in form of a User object.

Responses

  • default
    Hide response attributes Show response attributes object
    • description string Required
    • ok boolean Required

      Default value is false.

    • error_code integer Required
    • parameters object

      Contains information about why a request was unsuccessful.

      Hide parameters attributes Show parameters attributes object
      • migrate_to_chat_id integer

        Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

      • retry_after integer

        Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated

  • 200
    Hide response attributes Show response attributes object
    • ok boolean Required

      Default value is true.

    • result object Required

      This object represents a Telegram user or bot.

      Hide result attributes Show result attributes object
      • id integer Required

        Unique identifier for this user or bot

      • is_bot boolean Required

        True, if this user is a bot

      • first_name string Required

        User's or bot's first name

      • last_name string

        Optional. User's or bot's last name

      • username string

        Optional. User's or bot's username

      • language_code string

        Optional. IETF language tag of the user's language

      • can_join_groups boolean

        Optional. True, if the bot can be invited to groups. Returned only in getMe.

      • can_read_all_group_messages boolean

        Optional. True, if privacy mode is disabled for the bot. Returned only in getMe.

      • supports_inline_queries boolean

        Optional. True, if the bot supports inline queries. Returned only in getMe.

POST /getMe
curl \
 -X POST https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getMe
Response examples (default)
{
  "ok": false,
  "error_code": 42,
  "description": "string",
  "parameters": {
    "migrate_to_chat_id": 42,
    "retry_after": 42
  }
}
Response examples (default)
{
  "description": "string",
  "ok": false,
  "error_code": 42,
  "parameters": {
    "migrate_to_chat_id": 42,
    "retry_after": 42
  }
}
Response examples (200)
{
  "ok": true,
  "result": {
    "id": 42,
    "is_bot": true,
    "first_name": "string",
    "last_name": "string",
    "username": "string",
    "language_code": "string",
    "can_join_groups": true,
    "can_read_all_group_messages": true,
    "supports_inline_queries": true
  }
}
Response examples (200)
{
  "ok": true,
  "result": {
    "id": 42,
    "is_bot": true,
    "first_name": "string",
    "last_name": "string",
    "username": "string",
    "language_code": "string",
    "can_join_groups": true,
    "can_read_all_group_messages": true,
    "supports_inline_queries": true
  }
}