Skip to content

getMe

Get basic information about the Bot. Can be used to test whether the Bot token is valid.

Request

GET /:token/getMe

POST /:token/getMe

This method supports both GET and POST requests.

Parameters

No parameters required.

Response

Returns a basic information object for the Bot.

json
{
  "ok": true,
  "result": {
    "id": 123456789,
    "is_bot": true,
    "first_name": "MyBot",
    "username": "my_bot"
  }
}

Response Fields

FieldTypeDescription
idIntegerUnique identifier for the Bot
is_botBooleanWhether this is a Bot, always true
first_nameStringDisplay name of the Bot
usernameStringUsername of the Bot

Error Codes

CodeDescription
401Invalid or expired token
500Internal server error

Example

cURL

bash
curl -X GET "https://api.example.com/<token>/getMe"

Response

json
{
  "ok": true,
  "result": {
    "id": 123456789,
    "is_bot": true,
    "first_name": "MyBot",
    "username": "my_bot"
  }
}