1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-03 22:39:12 +02:00
Files
OpenIntegrations/docs/en/md/VKTeams/Common-methods/Check-token.md

46 lines
764 B
Markdown
Raw Normal View History

---
sidebar_position: 1
---
# Check token
Checks if the bot token is functional
`Function CheckToken(Val Token) Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Token | --token | String | Bot token |
Returns: Map Of KeyAndValue - Serialized JSON response from VK Teams
<br/>
:::tip
Method at API documentation: [GET /self/get](https://teams.vk.com/botapi/#/self/get_self_get)
:::
<br/>
```bsl title="Code example"
2024-08-13 16:47:32 +03:00
Token = "001.3501506236.091...";
Result = OPI_VKTeams.CheckToken(Token);
```
```sh title="CLI command example"
oint vkteams CheckToken --token "001.3501506236.091..."
```
```json title="Result"
2024-08-14 09:06:31 +03:00
{
"userId": "1011893356",
"ok": true
}
```