A
A
andreika_big2021-06-06 00:55:47
Python
andreika_big, 2021-06-06 00:55:47

VK API Python access key?

Good afternoon, tell me, please, I just started writing bots for VK . I get an
error that there is no access:
vk_api.exceptions.ApiError: [27] Group authorization failed: method is unavailable with group auth.
Here is my code: I took the token from the community
I want to write a bot that, upon request, gives the first photo of the album and a link to it

import vk_api
import requests
import random
token='49-----------33d0e19a5f29a2e6561c0bc3a9e435358e29d1ff8443035f4b366cd363e58'

# Создаем сессию
vk_session = vk_api.VkApi(token=token)

for_ans = ['привет', 'добрый вечер', 'добрый день', 'здравствуйте', 'здорова', 'здарова', 'здороу', 'hello', 'hi']

# Авторизуем токен
vk_session._auth_token()
albums = vk_session.method("photos.getAlbums")
print(albums)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-06-06
@andreika_big

It is written that this method does not work with a token from the community.

This method can be called with the user's access key.

https://vk.com/dev/photos.getAlbums

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question