I have a Github App created under an organization and is installed to a repository under same organization. I tried reading a file from the same repository after authenticating using github3 login_as_app_installation API. I get below error
File "/lib/python3.6/site-packages/github3/repos/repo.py", line 1618, in file_contents
json = self._json(self._get(url, params={"ref": ref}), 200)
File "/lib/python3.6/site-packages/github3/models.py", line 156, in _json
raise exceptions.error_for(response)
github3.exceptions.ForbiddenError: 403 Resource not accessible by integration
But I am able to add issue_comments after authenticating with the same API. Am I missing any permissions or problem is somewhere else?
There was a request to approve the Read access to code from Github for this app. It started working after explicitly approving it.