Python client for MAX messenger
Project description
vkmax
Python user client for VK MAX messenger (OneMe) with userbot and ToS avoiding features
What is VK MAX?
MAX (internal code name OneMe) is another project by the Russian government in an attempt to create a unified domestic messaging platform with features such as login via the government services account (Gosuslugi/ESIA).
It is developed by VK Group.
As usual, the application is extremely poorly made: all your contacts, login info and private messages are sent over the network in plain text without any encryption (besides TLS).
What is vkmax?
This is a client library for VK MAX, allowing to create userbots and custom clients.
An example of a simple userbot that retrieves weather can be found at examples/weather-userbot.
Protocol
The packet consists of five JSON fields:
ver(int) - currently it's 11seq(int) - packet incremental ID. Request and response seq match.cmd(int[0, 1]) - 0 for outgoing packets, 1 for incoming packetsopcode(int) - RPC method IDpayload(json) - arbitrary
Authorization flow
- Connect to websocket
wss://ws-api.oneme.ru/websocket - Send hello packet:
{ "userAgent": { "deviceType": "WEB", "locale": "ru_RU", "osVersion": "macOS", "deviceName": "vkmax Python", "headerUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36", "deviceLocale": "ru-RU", "appVersion": APP_VERSION, "screen": "956x1470 2.0x", "timezone": "Asia/Vladivostok" }, "deviceId": str(uuid.uuid4()) }
- Start auth:
{ "ver":11, "cmd":0, "seq":1, "opcode":17, "payload":{ "phone":"phone", "type":"START_AUTH", "language":"ru" } }
After that websocket sends a packet with sms_token to client - Confirm SMS code:
{ "token": sms_token, "verifyCode": str(sms_code), "authTokenType": "CHECK_CODE" }
Now you are logged in.
Client flow
Baseline packet looks like:
{
"ver": RPC_VERSION,
"cmd": 0,
"seq": seq,
"opcode": opcode,
"payload": payload
}
Known opcodes are listed in opcodes.md file.
Example of using baseline packet to send message:
{
"ver": 11,
"cmd": 0,
"seq": seq,
"opcode": 64,
"payload": {
"chatId": to_chat_id,
"message": {
"text": "text you need to send",
"cid": 175xxxxxxxxxx,
"elements": [],
"attaches": []
},
"notify": true
}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vkmax-1.0.0.tar.gz.
File metadata
- Download URL: vkmax-1.0.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3b71f4df5652715fdfbf3698b6a9f72a86696a26be6216592db837fbce0b629
|
|
| MD5 |
62f4eab39d237119d68b5d362bf4e4cc
|
|
| BLAKE2b-256 |
7650727e0cb2794d0b9d75afac0f1f0af0908d7883f8c55e06b47ba8e93dd48a
|
File details
Details for the file vkmax-1.0.0-py3-none-any.whl.
File metadata
- Download URL: vkmax-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
345e8576b0dd0ecd3c738aaffbac6b885abba2138f2e425a13e747d6d92702ad
|
|
| MD5 |
10e19c8498e26b8ea76107434fbbeef5
|
|
| BLAKE2b-256 |
611e1f782e6f4d11c176606364453562325d1920804c1adb6c0de2a742b8892f
|