B
B
barakuda12021-12-12 04:28:38
Python
barakuda1, 2021-12-12 04:28:38

VKAPIError_15: Access denied: no access to call this method?

from vkbottle.bot import Bot, Message

bot = Bot(token="MY_TOKEN")

@bot.on.message(text="Начать")
async def hi_handler(message: Message):
    users_info = await bot.api.users.get(message.from_id)
    await message.answer("Привет, {}".format(users_info[0].first_name))

bot.run_forever()


I'm using Long Poll 5.131, the API key has all access.
Issues:

Task exception was never retrieved
future: <Task finished name='Task-1' coro=<Bot.run_polling() done, defined at /usr/local/lib/python3.9/site-packages/vkbottle/framework/bot/bot.py:65> exception=VKAPIError_15('Access denied: no access to call this method')>
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/vkbottle/framework/bot/bot.py", line 69, in run_polling
    async for event in polling.listen():  # type: ignore
  File "/usr/local/lib/python3.9/site-packages/vkbottle/polling/bot_polling.py", line 55, in listen
    server = await self.get_server()
  File "/usr/local/lib/python3.9/site-packages/vkbottle/polling/bot_polling.py", line 50, in get_server
    return (await self.api.request("groups.getLongPollServer", {"group_id": self.group_id}))[
  File "/usr/local/lib/python3.9/site-packages/vkbottle/api/api.py", line 71, in request
    return await self.validate_response(method, data, response)
  File "/usr/local/lib/python3.9/site-packages/vkbottle/api/api.py", line 95, in validate_response
    response = await validator.validate(method, data, response, self)
  File "/usr/local/lib/python3.9/site-packages/vkbottle/api/response_validator/vk_api_error_validator.py", line 36, in validate
    raise exception(**error)
vkbottle.exception_factory.code_exception.VKAPIError_15: Access denied: no access to call this method


What is the problem? How to decide?

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