How to Get a GitHub API Token

Using the API token is one of Enji’s methods to retrieve information on development team activities from their repositories. This data is utilized in constructing various project reports.

Generating a Github API token involves two crucial steps:

  1. Setting permissions to use PAT (Personal Access Token)
  2. Generating a personal PAT

Setting Permissions to Use PAT:

Before generating the token, you need to allow the use of PAT (Personal Access Token) in your organization.

  1. Open your organization’s Settings → Personal access tokens → Settings.
  2. Set the value to Allow access for both PAT (Beta) and PAT (Classic), as shown in the picture below:
How to Get a GitHub API Token

Generating a Personal PAT:

  1. In GitHub, navigate to Settings → Developer settings.
  2. Go to Personal Access Tokens → Tokens (classic).
  3. Click on Generate new token.
  4. In the Token name, enter a name (can be anything you prefer).
  5. In Expiration Date, specify the token’s validity period. It’s recommended to set a range for a year or more. After expiration, the token becomes invalid, and Enji stops updating repository data.
  6. Check the boxes (important: the user generating the token must have all the privileges described below):
How to Get a GitHub API Token
How to Get a GitHub API Token

7. Click on Generate token.

8. Copy the token and use it when creating a repository/group.

ENJI
Enji.ai