A
A
Alexey2018-02-11 18:18:26
Python
Alexey, 2018-02-11 18:18:26

The bot is not authorized through the token, how to fix it?

When authorizing through a login and password, the bot is authorized, and when authorized through a token, it gives the following error:

C:\MyBot\venv\Scripts\python.exe C:/MyBot/MyBot.py
Traceback (most recent call last):
  File "C:/MyBot/MyBot.py", line 5, in <module>
    vk.auth()
  File "C:\MyBot\venv\lib\site-packages\vk_api\vk_api.py", line 143, in auth
    raise LoginRequired('Login is required to auth')
vk_api.exceptions.LoginRequired: Login is required to auth

Process finished with exit code 1

The token is correct.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Romanov, 2018-02-11
@6alexey9

No need to call vk.auth() when using token

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question