Get repo branch fails with "Resource not accessible by integration" error

Howdy folks :wave:

We have auth process in our website. So user can authenticate with Github, hence they provide us a token we can use to work with their repos, etc.

The issue I faced related to fetching particular branch from repo isn’t related to the user who’s related to the token.

When I use user token and call github API like /repos/{owner}/{repo}/branches it returns me info about branches.
When I want to call /repos/{owner}/{repo}/branches/{branch} it fails with error Resource not accessible by integration .

In case of fetching branch /repos/{owner}/{repo}/branches/{branch} of related repo to the user - it works fine.

Has anyone faced similar issues or can know what happens? Thanks in advance :smiley:

1 Like