Skip to content

Reference

GitHub (API Key)

Connect GitHub to Alter Vault using a personal access token for secure API access

Use GitHub credentials to make authenticated API calls through Alter Vault without exposing API keys in code.

PropertyValue
Provider IDgithub
CategoryDeveloper Tools
Credential TypeBearer Token

Log in to GitHub

Log in to your GitHub account at github.com.

Go to Developer Settings → Personal access tokens

Choose token type

Choose ‘Fine-grained tokens’ (recommended) or ‘Tokens (classic)’.

Generate a new token

Click ‘Generate new token’ and configure scopes.

Copy your token

Copy the generated token (it won’t be shown again).

Open the Developer Portal

Go to portal.alterauth.com and navigate to the application.

Add GitHub

Go to Managed Secrets > Add Provider > GitHub.

Enter credentials

Paste your Personal Access Token into the credential field.

Save

Click Save. You’ll receive a grant_id to use with the SDK.

response = await alter_app.request(
HttpMethod.GET,
"https://api.github.com/user/repos",
grant_id="YOUR_GRANT_ID",
)

Alter policy rules can target these attested operations and families for operation-level and parameter-aware controls.

Operation IDFamiliesMethodProvider path
repos/getreadGET/repos/{owner}/{repo}
repos/list-for-authenticated-userreadGET/user/repos
repos/list-for-orgreadGET/orgs/{org}/repos
repos/create-for-authenticated-userwritePOST/user/repos
repos/updateadminPATCH/repos/{owner}/{repo}
repos/deletedeleteDELETE/repos/{owner}/{repo}
issues/list-for-reporeadGET/repos/{owner}/{repo}/issues
issues/getreadGET/repos/{owner}/{repo}/issues/{issue_number}
issues/createwritePOST/repos/{owner}/{repo}/issues
issues/updatewritePATCH/repos/{owner}/{repo}/issues/{issue_number}
issues/create-commentwritePOST/repos/{owner}/{repo}/issues/{issue_number}/comments
issues/add-labelswritePOST/repos/{owner}/{repo}/issues/{issue_number}/labels
reactions/create-for-issuewritePOST/repos/{owner}/{repo}/issues/{issue_number}/reactions
pulls/listreadGET/repos/{owner}/{repo}/pulls
pulls/getreadGET/repos/{owner}/{repo}/pulls/{pull_number}
pulls/createwritePOST/repos/{owner}/{repo}/pulls
pulls/updatewritePATCH/repos/{owner}/{repo}/pulls/{pull_number}
pulls/mergewritePUT/repos/{owner}/{repo}/pulls/{pull_number}/merge
pulls/create-reviewwritePOST/repos/{owner}/{repo}/pulls/{pull_number}/reviews
repos/get-contentreadGET/repos/{owner}/{repo}/contents/{path}
repos/create-or-update-file-contentswritePUT/repos/{owner}/{repo}/contents/{path}
repos/delete-filedeleteDELETE/repos/{owner}/{repo}/contents/{path}
repos/list-branchesreadGET/repos/{owner}/{repo}/branches
repos/list-commitsreadGET/repos/{owner}/{repo}/commits
repos/get-commitreadGET/repos/{owner}/{repo}/commits/{ref}
git/create-refwritePOST/repos/{owner}/{repo}/git/refs
git/delete-refdeleteDELETE/repos/{owner}/{repo}/git/refs/{ref}
repos/list-releasesreadGET/repos/{owner}/{repo}/releases
repos/create-releasewritePOST/repos/{owner}/{repo}/releases
gists/createwritePOST/gists
actions/list-workflow-runs-for-reporeadGET/repos/{owner}/{repo}/actions/runs
actions/create-workflow-dispatchwritePOST/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
repos/list-collaboratorsreadGET/repos/{owner}/{repo}/collaborators
repos/add-collaboratoradminPUT/repos/{owner}/{repo}/collaborators/{username}
repos/remove-collaboratoradminDELETE/repos/{owner}/{repo}/collaborators/{username}
repos/list-webhooksreadGET/repos/{owner}/{repo}/hooks
repos/create-webhookadminPOST/repos/{owner}/{repo}/hooks
repos/delete-webhookadmin, deleteDELETE/repos/{owner}/{repo}/hooks/{hook_id}
search/reposreadGET/search/repositories
search/codereadGET/search/code
search/issues-and-pull-requestsreadGET/search/issues
users/get-authenticatedreadGET/user
orgs/getreadGET/orgs/{org}
orgs/list-membersreadGET/orgs/{org}/members
teams/listreadGET/orgs/{org}/teams

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.