I
I
irov6662021-03-28 18:10:04
In contact with
irov666, 2021-03-28 18:10:04

How now to connect a token in Node JS (vk-io)?

A very easy question.

Recently switched to [email protected]
Worked with this module, everything was fine. How vk.setOptions() was removed in this version, I thought a little. Now how do I connect the community to the script.

[Part of code]
vk.setOptions({
token: '1111`, // token
apiMode: "parallel",
pollingGroupId: "1111" //community ID
});

thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Miiinro, 2021-03-28
@Miiinro

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

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question