S
S
sbuw2021-09-01 19:02:57
Python
sbuw, 2021-09-01 19:02:57

Error "Access denied: no access to this vk api chat", how to fix?

I use the VkBottle library (in principle, it doesn't matter), it gives the error "Access denied: no access to this chat vk api"

PS:
I set all permissions for the token.

The code :

from vkbottle.bot import Bot, Message
from config import token, utoken
from vkbottle import API

api = API(token=utoken)
bot = Bot(token=token)

@bot.on.message(text="добавить <member>")
async def join_def(message:Message, member):
    await api.messages.add_chat_user(chat_id=message.peer_id-2e9, user_id=int(member[3:12]))

bot.run_forever()

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question