Installation
Get started with VK-IO by installing it in your Node.js project. VK-IO supports all modern package managers and comes with full TypeScript support out of the box.Requirements
Node.js 12.20.0 or newer is requiredVK-IO requires a modern Node.js runtime with ESM support. Check your Node.js version with
node --version.- Node.js 12.20.0 or higher
- A VK API token (group token or user token)
- A package manager: npm, yarn, or pnpm
Installing VK-IO
Choose your preferred package manager to install VK-IO:Getting Your VK API Token
To use VK-IO, you need an API token from VK. The type of token depends on your use case:Community (Group) Token
For building bots and automated community tools:Create or Select a Community
Go to vk.com/groups and create a new community or select an existing one
Create Access Token
Click Create token and select the required permissions:
- For bots:
messages(to send and receive messages) - For wall posts:
wall(to create and manage wall posts) - For additional features: select other permissions as needed
Enable Messages API (for bots)
If building a bot, enable Long Poll API under Messages → Bot settings
User Token
For applications that need user-level access: You can obtain a user token through:- Implicit Flow - Using the @vk-io/authorization package
- VK Admin Panel - Through the VK application settings
Storing Your Token Securely
Never hardcode your token in your source code. Use environment variables instead:Module System Support
VK-IO supports both ESM (ES Modules) and CommonJS:VK-IO is built with native ESM support. For the best experience, use ES Modules in your project by adding
"type": "module" to your package.json.TypeScript Support
VK-IO is written in TypeScript and includes full type definitions:@types packages are needed - everything is included.
Installing Ecosystem Packages
Enhance VK-IO with official ecosystem packages:Verifying Your Installation
Test your installation with a simple API call:Next Steps
Quick Start
Build your first VK bot with a working example
API Documentation
Explore the complete API reference
Updates & Webhooks
Learn how to receive and handle VK events
Examples
Discover real-world implementation examples