V
V
vovaekb902020-07-27 15:50:47
Python
vovaekb90, 2020-07-27 15:50:47

Why do I get the "group docs are disabled" error when requesting a list of community articles via the Vkontakte API?

I am using the vk_api library to access the Vkontakte API.
I need to get a list of articles in a group (method docs.get). When executing the request, I get an error: "vk_api.exceptions.ApiError: [15] Access denied: group docs are disabled". My code:

vk_session = vk_api.VkApi(login='+79221275150', password='<pass>', app_id=7550219, token='tT4khjSUdr8et8q1N0Ru', scope='groups, docs')
vk_session.auth()
vk = vk_session.get_api()

group_id = 73519170
posts_response = vk.docs.get(owner_id=-73519170)


The documentation for the docs.get method says that this method requires the "docs" access right. I specified access rights in the scope field when creating the VkApi object. What additional rights or details do I need to get to get a list of articles in a group?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-07-27
@SoreMix

Because there are no documents in the group. They are disabled in the settings.
Plus, if my memory serves me, there are two types of groups in VK - page and group . You have exactly page , and documents cannot be included in them at all
Well, if you make such a request by passing counters to the parameters , you will see that the number of documents is not returned
https://vk.com/dev/groups.getById?params[ group_id]...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question