I am getting a
404 Not Found when attempting to add a user to a GitHub Org via the GitHub App API flow.
API Flow / Steps to Reproduce:
- Create a GitHub App and give it
Read & writeaccess to
- Generate and download the App’s private key, and record it’s ID
- Install the App on a GitHub Org
- Generate a JSON Web Token (JWT) using the private key and App ID
- Using the JWT and custom
Acceptheader, get a list of the app installations [works]; record the installation ID for the GitHub Org
- Using the JWT, custom
Acceptheader and installation ID, create an Installation Token [works]
- Using the Installation Token, get a list of the organization’s members [works] (authentication works - can see private members)
- Using the Installation Token, attempt to add a user to the org [Fails:
404 Not Found]
According to the docs, the API call should be:
…but it fails.
I have verified:
- The API documentation states that the API endpoint is “Enabled for GitHub Apps.”
- The Installation Token is valid and functional (can use it to see private members of the org).
- The organization name.
- The username.
I have tried:
- Setting the
- Changing the request method to
- Using the JWT as the token for the request.