M
M
mrsakura522021-11-18 21:18:19
In contact with
mrsakura52, 2021-11-18 21:18:19

How to add to community emergency?

I'm trying to use vk-io and vk api to add a user to a group's emergency via vk.api.groups.ban(), it gives me an error:

zOunPlEbGsE.jpg?size=677x342&quality=96&sign=14076c23c5c6685159734ae71c22aca3&type=album

vk.api.groups.ban({
                owner_id: boardParametrs['fromId'],
                reason: 3,
                comment: 'ban-comment',
                comment_visible: 1
            })


I did not find it on the Internet. The group is signed and there is even a dialogue with it. What is wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iBird Rose, 2021-11-18
@iiiBird

And read and, if not clear, then translate the error? It says in plain text that this method does not work with the group token. And on the method page itself it is also written that it can only be called with a user token https://vk.com/dev/groups.ban

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question