2024-06-05 12:19:46 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 1
|
|
|
|
---
|
|
|
|
|
|
|
|
# Get bot information
|
2024-07-10 10:59:55 +02:00
|
|
|
Executes the /getMe request, returning basic bot information: name, id, ability to add the bot to groups, etc..
|
|
|
|
|
|
|
|
|
|
|
|
<br/>
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
`Function GetBotInformation(Val Token) Export`
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Destination |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Token | --token | String | Bot token |
|
|
|
|
|
|
|
|
|
2024-06-06 14:33:52 +02:00
|
|
|
Returns: Map Of KeyAndValue - Serialized JSON response from Telegram
|
2024-06-05 12:19:46 +02:00
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
```bsl title="Code example"
|
|
|
|
Token = "6129457865:AAFyzNYOAFbu...";
|
|
|
|
Result = OPI_Telegram.GetBotInformation(Token);
|
|
|
|
```
|
2024-07-10 10:59:55 +02:00
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
|
|
|
|
oint telegram GetBotInformation --token "6129457865:AAFyzNYOAFbu..."
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-07-10 10:59:55 +02:00
|
|
|
{
|
2024-06-05 12:19:46 +02:00
|
|
|
"ok": true,
|
|
|
|
"result": {
|
|
|
|
"id": 6129457865,
|
|
|
|
"is_bot": true,
|
|
|
|
"first_name": "Vitaly The Bot",
|
|
|
|
"username": "sicheebot",
|
|
|
|
"can_join_groups": true,
|
|
|
|
"can_read_all_group_messages": false,
|
|
|
|
"supports_inline_queries": false,
|
|
|
|
"can_connect_to_business": false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|