How to get a GitHub API key
Checked by hand 2026-10-30
- Open the new fine-grained token page. GitHub first asks you to confirm it is you with your two-factor code or an emailed code; that is normal. Then type a name for the token.
- Pick an expiration, choose which repositories it can reach, and add only the permissions your app needs. Then click Generate token at the bottom of the page.
- Click Generate token in the box that opens. GitHub shows the token only once, on the next page.
What you end up with
- GITHUB_TOKEN