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
| Field | Type | Description |
|---|---|---|
| id | Integer | Unique identifier for the Bot |
| is_bot | Boolean | Whether this is a Bot, always true |
| first_name | String | Display name of the Bot |
| username | String | Username of the Bot |
Error Codes
| Code | Description |
|---|---|
| 401 | Invalid or expired token |
| 500 | Internal 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"
}
}