A user has authorized my app to access a repo in an organization they are part of. I am able to list the repo's issues via
However, when I try to access the issue's labels like so:
I get "Resource not accessible by integration"
Hey, are you using the GitHub API v3 or v4?
I'm already using the API as directed to get an issue's labels and it works in all other cases. In this specific case, where a user is part of a certain organization, I cannot access the labels on an issue even though I can access the issue. Seems to be a strange organization permission I don't understand.
I do have "read" permission for Pull requests. Here are all the permissions my app requests:
Pull requests: read
To add to the confusion, I can't access a label search on this repo with an "access_token" on the URL. But if I remove the "access_token", then I can access the search. This is the exact repo and label that works with no access token:
If I add a random access_token, I rightfully get "Bad credentials".
If I add the access_token that was granted to my app by a user that has admin permission on this repo, I get "Resource not accessible by integration". 🤷♂️