Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minvk

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minvk

Minimalistic NodeJS VK API

  • 3.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

minvk 2.0

Minimalistic NodeJS VK API

Installation

npm i minvk

Usage

// Create new instance of vk.community
const vk = new VK.community({
    access_token, // access_token for community with at least manage and messages rights
    group_id, // id of group
    url, // web-hook url
    server_id, // server id from vk interface
    port, // port of callback server
    secret_key // secret key
});

// Create new instance of vk.user
const vk = new VK.user({
    username,
    password,
    // OR
    access_token // access_token for user
});

// Initialize api
await vk.init();

// Make vk api call
await vk.call('messages.send', {/* ... */});
await vk.call('user.getInfo');

// Listen to new messages
// works for both users and communities!
vk.on('message_new', (message) => {/* https://vk.com/dev/objects/message */)); // new messages
vk.on('message_reply', (message) => {/* https://vk.com/dev/objects/message */)); // new replies

// Listen to community events
vk.on('some_event_from_callback_api', () => false);

FAQs

Package last updated on 01 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc