GitHub REST API
- URL
-
https://api.github.com - Docs
- https://docs.github.com/en/rest
Authorization: Bearer <credential> Create a personal access token from GitHub account settings using Managing your personal access tokens. GitHub recommends a fine-grained PAT when possible. Choose the repository permissions or classic scopes your integration needs; for public-repo-only GraphQL access, docs note fine-grained PATs include read access to public repositories, while classic PATs need the public_repo scope.
Authorization: Bearer <credential> Register a GitHub App using Registering a GitHub App. After registration, generate the app's private key and use it to mint a JWT and then installation or user access tokens as described under GitHub App authentication docs linked from that page. Choose the app permissions your integration needs.
Authorization: Bearer <credential> /Authorization: Basic <credential> Create an OAuth app in GitHub settings using Creating an OAuth app. Configure the callback URL, then authorize the app with a user via the web or device flow as described in GitHub's OAuth docs to obtain an access token. For some app-management REST endpoints, GitHub docs say to use the app's client_id and client_secret with HTTP Basic auth.