L
L
lleballex2020-07-14 11:47:06
Python
lleballex, 2020-07-14 11:47:06

Python vk_api. Why can't I join the conversation?

I'm making a bot for VK. I get an error when trying to join the chat. Changed the token, did not help. Although, if you attach the bot yourself, through the page, everything works. How to fix?

vk_session = VkApi(token=config.API_TOKEN)
vk = vk_session.get_api()
longpoll = VkLongPoll(vk_session)
for event in longpoll.listen():
    if event.type == VkEventType.MESSAGE_NEW and event.user_id and event.user_id != config.BOT_ID:
        if event.from_user and event.text[:8] == 'https://':
            vk.messages.joinChatByInviteLink(link = event.text)

But an error pops up:
vk_api.exceptions.ApiError: [27] Group authorization failed: method is unavailable with group auth.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Guerro69, 2020-07-14
@Guerro69

It is clearly written: [27] Group authorization failed: method is unavailable with group auth.
The method is not available from the group side

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question