I am using Gitlab v4 api to list a project's variables, while the code returns vars for some projects, it also returns 403 forbidden response for some other projects. And the error is not very verbose so I'm confused what could be the possible reason. I'm using a group access token which has read api permissions on all projects within the group. Below is the piece of code:
group = gl.groups.get(20, lazy=True)
group_projects = group.projects.list(include_subgroups=True, all=True)
for group_project in group_projects:
project = gl.projects.get(group_project.id)
project.variables.list(get_all=True)
error: b'{"message":"403 Forbidden"}'
What might be the reason for this?