Answer the question
In order to leave comments, you need to log in
I am writing a bot for VK, it gives an error, the method is not for that type of conversation. Which one should be used?
vk_api.exceptions.ApiError: [5] User authorization failed: method is unavailable with group auth.
import requests
import vk_api
from vk_api.longpoll import VkLongPoll,VkEventType
def answer(user_id, messege):
vk_session.method('message.send',{'user.id':user_id,'message':messege})
#Токен там нормальный
vk_session = vk_api.VkApi(token='1')
longpool= VkLongPoll(vk_session)
for event in longpool.listen():
if event.type==VkEventType.MESSAGE_NEW:
if event.to_me:
request=event.text
if request=="Привет":
answer(event.user_id, "Дороу ")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question