Github API v3 access to forked repo

I’m using Github API v3 and testing with both a Developer Access Token or a Github App permission access token. In my particular case, I have a pull request from a forked repo (branch-A) to the base repo (branch-B). I want to modify this branch-A of forked repo (trying to merge head commit ID of branch-B into branch-A).

As a developer who has access to base repo,  I am able to modify the forked repo branch-A manually, but unable to do so from the following API:

I get a 403:

{‘message’: ‘Must have admin rights to Repository.’, ‘documentation_url’: ‘’}

I tried with my developer token access as well as with Github App access. It works fine when both branches are in base repo, but not when the branch is in forked repo.

1 Like