Answer the question
In order to leave comments, you need to log in
Python VK_Api Why can't login with community permissions?
Everything works for the user, but not with community rights. Even though this code worked before. Not now. What's wrong?
import vk_api
vk = vk_api.VkApi(token='блаблатокенбла')
vk.auth()
vk.method('messages.send', {'user_id': 'блаюзер', 'message': 'сообщениебла'})
Traceback (most recent call last):
File "main.py", line 4, in <module>
vk.auth()
File "/usr/local/lib/python3.6/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
Answer the question
In order to leave comments, you need to log in
vk.auth()
- only needed when authorizing a user
When authorizing with group access rights - no
I know that it is very relevant, but - vk._auth_token()
a function for authorizing the community by token
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question