vk-io icon indicating copy to clipboard operation
vk-io copied to clipboard

Modern VK API SDK for Node.js

NPM version Build Status NPM downloads

VK-IO - This is a powerful Node.js module that allows you to easily interact with the VK API 🚀

📖 Documentation 🤖 Examples

Features

  1. Complete. 100% coverage of the VK API
  2. Simple. Predictable abstraction of VK API. 1 to 1 mapping of API method
    vk.api.users.get({ ... });
    
  3. Reliable. The library is written in TypeScript and covered by tests.
  4. Powerful. Supports following additional features:
    • Proxy support via Custom Agents;
    • Automatic request parallelization for processing massive amounts of requests to API;
    • User Authorization (even with login and password);
    • Ecosystem for bot development.

📦 Installation

Node.js 12.20.0 or newer is required

  • Using Yarn (recommended)
    yarn add vk-io
    
  • Using npm
    npm i vk-io
    
  • Using pnpm
    pnpm add vk-io
    

Example usage

import { VK } from 'vk-io';

const vk = new VK({
	token: process.env.TOKEN
});

async function run() {
	const response = await vk.api.wall.get({
		owner_id: 1
	});

	console.log(response);
}

run().catch(console.log);

Community

Useful modules that may be useful to you

  • @vk-io/stateless-prompt: Simple implementation of stateless prompt
  • @vk-io/authorization: Authorization by login & password, and etc...
  • @vk-io/streaming: Receiving data with Streaming API
  • @vk-io/session: Simple implementation of the sessions
  • @vk-io/scenes: Simple implementation of middleware-based scene management
  • @vk-io/hear: Simple implementation of the hears
  • vk-io-question: Simple promise-based prompt
  • vk-io-pages: Dynamic pages pagination module
  • henta: Simple VK bot engine
  • vk-io-redis-storage: Simple storage add-on for @vk-io/session

If you want to add your module in the list, create a new issue in the repository.