docs: update VK channel docs to use secure token storage
This commit is contained in:
parent
7560b6a295
commit
f0fdcf19ac
1 changed files with 20 additions and 5 deletions
|
|
@ -9,7 +9,7 @@ The VK channel uses Bots Long Poll API for bot-based communication with VK socia
|
||||||
"channels": {
|
"channels": {
|
||||||
"vk": {
|
"vk": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"token": "your_vk_access_token",
|
"token": "NOT_HERE",
|
||||||
"group_id": 123456789,
|
"group_id": 123456789,
|
||||||
"allow_from": ["123456789"],
|
"allow_from": ["123456789"],
|
||||||
"group_trigger": {
|
"group_trigger": {
|
||||||
|
|
@ -24,11 +24,25 @@ The VK channel uses Bots Long Poll API for bot-based communication with VK socia
|
||||||
| Field | Type | Required | Description |
|
| Field | Type | Required | Description |
|
||||||
| ---------------- | ------ | -------- | ------------------------------------------------------------------ |
|
| ---------------- | ------ | -------- | ------------------------------------------------------------------ |
|
||||||
| enabled | bool | Yes | Whether to enable the VK channel |
|
| enabled | bool | Yes | Whether to enable the VK channel |
|
||||||
| token | string | Yes | VK Community Access Token |
|
| token | string | Yes | Set to `NOT_HERE` - token is stored securely (see Token Storage) |
|
||||||
| group_id | int | Yes | VK Community ID (Group ID) |
|
| group_id | int | Yes | VK Community ID (Group ID) |
|
||||||
| allow_from | array | No | Allowlist of user IDs; empty means all users are allowed |
|
| allow_from | array | No | Allowlist of user IDs; empty means all users are allowed |
|
||||||
| group_trigger | object | No | Configuration for group chat triggers |
|
| group_trigger | object | No | Configuration for group chat triggers |
|
||||||
|
|
||||||
|
### Token Storage
|
||||||
|
|
||||||
|
For security reasons, the VK access token should not be stored directly in the configuration file. Instead:
|
||||||
|
|
||||||
|
1. Set `token` to `"NOT_HERE"` in the configuration
|
||||||
|
2. Store the actual token using one of these methods:
|
||||||
|
- **Environment variable**: Set `PICOCLAW_CHANNELS_VK_TOKEN` environment variable
|
||||||
|
- **Secure storage**: Use PicoClaw's secure token storage mechanism
|
||||||
|
|
||||||
|
Example using environment variable:
|
||||||
|
```bash
|
||||||
|
export PICOCLAW_CHANNELS_VK_TOKEN="vk1.a.abc123..."
|
||||||
|
```
|
||||||
|
|
||||||
### Group Trigger Configuration
|
### Group Trigger Configuration
|
||||||
|
|
||||||
| Field | Type | Description |
|
| Field | Type | Description |
|
||||||
|
|
@ -59,6 +73,7 @@ The VK channel uses Bots Long Poll API for bot-based communication with VK socia
|
||||||
- `photos` - Access to photos (optional)
|
- `photos` - Access to photos (optional)
|
||||||
- `docs` - Access to documents (optional)
|
- `docs` - Access to documents (optional)
|
||||||
4. Copy the generated access token
|
4. Copy the generated access token
|
||||||
|
5. Store the token securely (see Token Storage section below)
|
||||||
|
|
||||||
### 4. Configure PicoClaw
|
### 4. Configure PicoClaw
|
||||||
|
|
||||||
|
|
@ -98,7 +113,7 @@ VK has a maximum message length of 4000 characters. PicoClaw automatically split
|
||||||
"channels": {
|
"channels": {
|
||||||
"vk": {
|
"vk": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"token": "vk1.a.abc123...",
|
"token": "NOT_HERE",
|
||||||
"group_id": 123456789
|
"group_id": 123456789
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -112,7 +127,7 @@ VK has a maximum message length of 4000 characters. PicoClaw automatically split
|
||||||
"channels": {
|
"channels": {
|
||||||
"vk": {
|
"vk": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"token": "vk1.a.abc123...",
|
"token": "NOT_HERE",
|
||||||
"group_id": 123456789,
|
"group_id": 123456789,
|
||||||
"allow_from": ["123456789", "987654321"]
|
"allow_from": ["123456789", "987654321"]
|
||||||
}
|
}
|
||||||
|
|
@ -127,7 +142,7 @@ VK has a maximum message length of 4000 characters. PicoClaw automatically split
|
||||||
"channels": {
|
"channels": {
|
||||||
"vk": {
|
"vk": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"token": "vk1.a.abc123...",
|
"token": "NOT_HERE",
|
||||||
"group_id": 123456789,
|
"group_id": 123456789,
|
||||||
"group_trigger": {
|
"group_trigger": {
|
||||||
"prefixes": ["/bot", "!bot"]
|
"prefixes": ["/bot", "!bot"]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue