Create an installation access token for an app
Creates an installation access token that enables a GitHub App to make authenticated API requests for the app’s installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of 401 - Unauthorized, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.
[!NOTE] Starting April 27, 2026, GitHub began a staged rollout of a stateless format (
ghs_APPID_JWT) to all newly minted GitHub App installation tokens, making them more performant and improving the reliability of our API surface. If your application expects or relies on installation tokens being exactly 40 characters long, it may not handle this new token format correctly. You can now validate your apps and workflows using a temporary request header that lets you enable the token format on demand. For more information about the temporary header, see the GitHub blog.
Optionally, you can use the repositories or repository_ids body parameters to specify individual repositories that the installation access token can access. If you don’t use repositories or repository_ids to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.
Optionally, use the permissions body parameter to specify the permissions that the installation access token should have. If permissions is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.
You must use a JWT to access this endpoint.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The unique identifier of the installation.
Examples
1Request Body
Section titled “ Request Body ”object
List of repository names that the token should have access to
List of repository IDs that the token should have access to
The permissions granted to the fine-grained access token.
object
The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
The level of permission to grant the access token to create and retrieve build artifact metadata records.
The level of permission to create and retrieve the access token for repository attestations.
The level of permission to grant the access token for checks on code.
The level of permission to grant the access token to view and manage code quality data.
The level of permission to grant the access token to create, edit, delete, and list Codespaces.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
The level of permission to grant the access token to manage Dependabot secrets.
The level of permission to grant the access token for deployments and deployment statuses.
The level of permission to grant the access token for discussions and related comments and labels.
The level of permission to grant the access token for managing repository environments.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
The level of permission to grant the access token to manage the merge queues for a repository.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
The level of permission to grant the access token for packages published to GitHub Packages.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property.
The level of permission to grant the access token to manage the post-receive hooks for a repository.
The level of permission to grant the access token to manage repository projects, columns, and cards.
The level of permission to grant the access token to view and manage secret scanning alerts.
The level of permission to grant the access token to manage repository secrets.
The level of permission to grant the access token to view and manage security events like code scanning alerts.
The level of permission to grant the access token to manage just a single file.
The level of permission to grant the access token for commit statuses.
The level of permission to grant the access token to manage Dependabot alerts.
The level of permission to grant the access token to update GitHub Actions workflow files.
The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property.
The level of permission to grant the access token for organization teams and members.
The level of permission to grant the access token to manage access to an organization.
The level of permission to grant the access token for custom repository roles management.
The level of permission to grant the access token for custom organization roles management.
The level of permission to grant the access token for repository custom properties management at the organization level.
The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change.
The level of permission to grant the access token to view and manage Copilot cloud agent settings for an organization.
The level of permission to grant the access token to view and manage announcement banners for an organization.
The level of permission to grant the access token to view events triggered by an activity in an organization.
The level of permission to grant the access token to manage the post-receive hooks for an organization.
The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization.
The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization.
The level of permission to grant the access token for viewing an organization’s plan.
The level of permission to grant the access token to manage organization projects and projects public preview (where available).
The level of permission to grant the access token for organization packages published to GitHub Packages.
The level of permission to grant the access token to manage organization secrets.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
The level of permission to grant the access token to view and manage users blocked by the organization.
The level of permission to grant the access token to manage the email addresses belonging to a user.
The level of permission to grant the access token to manage the followers belonging to a user.
The level of permission to grant the access token to manage git SSH keys.
The level of permission to grant the access token to view and manage GPG keys belonging to a user.
The level of permission to grant the access token to view and manage interaction limits on a repository.
The level of permission to grant the access token to manage the profile settings belonging to a user.
The level of permission to grant the access token to list and manage repositories a user is starring.
The level of permission to grant the access token for organization custom properties management at the enterprise level.
Examples
{ "repositories": [ "Hello-World" ], "permissions": { "issues": "write", "contents": "read" }}Responses
Section titled “ Responses ”Response
Authentication token for a GitHub App installed on a user or org.
object
The permissions granted to the fine-grained access token.
object
The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
The level of permission to grant the access token to create and retrieve build artifact metadata records.
The level of permission to create and retrieve the access token for repository attestations.
The level of permission to grant the access token for checks on code.
The level of permission to grant the access token to view and manage code quality data.
The level of permission to grant the access token to create, edit, delete, and list Codespaces.
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
The level of permission to grant the access token to manage Dependabot secrets.
The level of permission to grant the access token for deployments and deployment statuses.
The level of permission to grant the access token for discussions and related comments and labels.
The level of permission to grant the access token for managing repository environments.
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
The level of permission to grant the access token to manage the merge queues for a repository.
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
The level of permission to grant the access token for packages published to GitHub Packages.
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
The level of permission to grant the access token to view and edit custom properties for a repository, when allowed by the property.
The level of permission to grant the access token to manage the post-receive hooks for a repository.
The level of permission to grant the access token to manage repository projects, columns, and cards.
The level of permission to grant the access token to view and manage secret scanning alerts.
The level of permission to grant the access token to manage repository secrets.
The level of permission to grant the access token to view and manage security events like code scanning alerts.
The level of permission to grant the access token to manage just a single file.
The level of permission to grant the access token for commit statuses.
The level of permission to grant the access token to manage Dependabot alerts.
The level of permission to grant the access token to update GitHub Actions workflow files.
The level of permission to grant the access token to view and edit custom properties for an organization, when allowed by the property.
The level of permission to grant the access token for organization teams and members.
The level of permission to grant the access token to manage access to an organization.
The level of permission to grant the access token for custom repository roles management.
The level of permission to grant the access token for custom organization roles management.
The level of permission to grant the access token for repository custom properties management at the organization level.
The level of permission to grant the access token for managing access to GitHub Copilot for members of an organization with a Copilot Business subscription. This property is in public preview and is subject to change.
The level of permission to grant the access token to view and manage Copilot cloud agent settings for an organization.
The level of permission to grant the access token to view and manage announcement banners for an organization.
The level of permission to grant the access token to view events triggered by an activity in an organization.
The level of permission to grant the access token to manage the post-receive hooks for an organization.
The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization.
The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization.
The level of permission to grant the access token for viewing an organization’s plan.
The level of permission to grant the access token to manage organization projects and projects public preview (where available).
The level of permission to grant the access token for organization packages published to GitHub Packages.
The level of permission to grant the access token to manage organization secrets.
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
The level of permission to grant the access token to view and manage users blocked by the organization.
The level of permission to grant the access token to manage the email addresses belonging to a user.
The level of permission to grant the access token to manage the followers belonging to a user.
The level of permission to grant the access token to manage git SSH keys.
The level of permission to grant the access token to view and manage GPG keys belonging to a user.
The level of permission to grant the access token to view and manage interaction limits on a repository.
The level of permission to grant the access token to manage the profile settings belonging to a user.
The level of permission to grant the access token to list and manage repositories a user is starring.
The level of permission to grant the access token for organization custom properties management at the enterprise level.
A repository on GitHub.
object
Unique identifier of the repository
The name of the repository.
License Simple
object
object
A GitHub user.
object
Whether the repository is private or public.
The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
The default branch of the repository.
Whether this repository acts as a template that can be used to generate new repositories.
Whether issues are enabled.
Whether projects are enabled.
Whether the wiki is enabled.
Whether downloads are enabled.
Whether discussions are enabled.
Whether pull requests are enabled.
The policy controlling who can create pull requests: all or collaborators_only.
Whether the repository is archived.
Returns whether or not this repository disabled.
The repository visibility: public, private, or internal.
Whether to allow rebase merges for pull requests.
Whether to allow squash merges for pull requests.
Whether to allow Auto-merge to be used on pull requests.
Whether to delete head branches when pull requests are merged
Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
Whether a squash merge commit can use the pull request title as default. **This property is closing down. Please use squash_merge_commit_title instead.
The default value for a squash merge commit title:
PR_TITLE- default to the pull request’s title.COMMIT_OR_PR_TITLE- default to the commit’s title (if only one commit) or the pull request’s title (when more than one commit).
The default value for a squash merge commit message:
PR_BODY- default to the pull request’s body.COMMIT_MESSAGES- default to the branch’s commit messages.BLANK- default to a blank commit message.
The default value for a merge commit title.
PR_TITLE- default to the pull request’s title.MERGE_MESSAGE- default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
The default value for a merge commit message.
PR_TITLE- default to the pull request’s title.PR_BODY- default to the pull request’s body.BLANK- default to a blank commit message.
Whether to allow merge commits for pull requests.
Whether to allow forking this repo
Whether to require contributors to sign off on web-based commits
Whether anonymous git access is enabled for this repository
The status of the code search index for this repository
object
Examples
{ "token": "ghs_16C7e42F292c6912E7710c838347Ae178B4a", "expires_at": "2016-07-11T22:14:10Z", "permissions": { "issues": "write", "contents": "read" }, "repository_selection": "selected", "repositories": [ { "id": 1296269, "node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5", "name": "Hello-World", "full_name": "octocat/Hello-World", "owner": { "login": "octocat", "id": 1, "node_id": "MDQ6VXNlcjE=", "avatar_url": "https://github.com/images/error/octocat_happy.gif", "gravatar_id": "", "url": "https://api.github.com/users/octocat", "html_url": "https://github.com/octocat", "followers_url": "https://api.github.com/users/octocat/followers", "following_url": "https://api.github.com/users/octocat/following{/other_user}", "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", "organizations_url": "https://api.github.com/users/octocat/orgs", "repos_url": "https://api.github.com/users/octocat/repos", "events_url": "https://api.github.com/users/octocat/events{/privacy}", "received_events_url": "https://api.github.com/users/octocat/received_events", "type": "User", "site_admin": false }, "private": false, "html_url": "https://github.com/octocat/Hello-World", "description": "This your first repo!", "fork": false, "url": "https://api.github.com/repos/octocat/Hello-World", "archive_url": "https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}", "assignees_url": "https://api.github.com/repos/octocat/Hello-World/assignees{/user}", "blobs_url": "https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}", "branches_url": "https://api.github.com/repos/octocat/Hello-World/branches{/branch}", "collaborators_url": "https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}", "comments_url": "https://api.github.com/repos/octocat/Hello-World/comments{/number}", "commits_url": "https://api.github.com/repos/octocat/Hello-World/commits{/sha}", "compare_url": "https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}", "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/{+path}", "contributors_url": "https://api.github.com/repos/octocat/Hello-World/contributors", "deployments_url": "https://api.github.com/repos/octocat/Hello-World/deployments", "downloads_url": "https://api.github.com/repos/octocat/Hello-World/downloads", "events_url": "https://api.github.com/repos/octocat/Hello-World/events", "forks_url": "https://api.github.com/repos/octocat/Hello-World/forks", "git_commits_url": "https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}", "git_refs_url": "https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}", "git_tags_url": "https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}", "git_url": "git:github.com/octocat/Hello-World.git", "issue_comment_url": "https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}", "issue_events_url": "https://api.github.com/repos/octocat/Hello-World/issues/events{/number}", "issues_url": "https://api.github.com/repos/octocat/Hello-World/issues{/number}", "keys_url": "https://api.github.com/repos/octocat/Hello-World/keys{/key_id}", "labels_url": "https://api.github.com/repos/octocat/Hello-World/labels{/name}", "languages_url": "https://api.github.com/repos/octocat/Hello-World/languages", "merges_url": "https://api.github.com/repos/octocat/Hello-World/merges", "milestones_url": "https://api.github.com/repos/octocat/Hello-World/milestones{/number}", "notifications_url": "https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}", "pulls_url": "https://api.github.com/repos/octocat/Hello-World/pulls{/number}", "releases_url": "https://api.github.com/repos/octocat/Hello-World/releases{/id}", "ssh_url": "git@github.com:octocat/Hello-World.git", "stargazers_url": "https://api.github.com/repos/octocat/Hello-World/stargazers", "statuses_url": "https://api.github.com/repos/octocat/Hello-World/statuses/{sha}", "subscribers_url": "https://api.github.com/repos/octocat/Hello-World/subscribers", "subscription_url": "https://api.github.com/repos/octocat/Hello-World/subscription", "tags_url": "https://api.github.com/repos/octocat/Hello-World/tags", "teams_url": "https://api.github.com/repos/octocat/Hello-World/teams", "trees_url": "https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}", "clone_url": "https://github.com/octocat/Hello-World.git", "mirror_url": "git:git.example.com/octocat/Hello-World", "hooks_url": "https://api.github.com/repos/octocat/Hello-World/hooks", "svn_url": "https://svn.github.com/octocat/Hello-World", "homepage": "https://github.com", "language": null, "forks_count": 9, "stargazers_count": 80, "watchers_count": 80, "size": 108, "default_branch": "master", "open_issues_count": 0, "is_template": true, "topics": [ "octocat", "atom", "electron", "api" ], "has_issues": true, "has_projects": true, "has_wiki": true, "has_pages": false, "has_downloads": true, "archived": false, "disabled": false, "visibility": "public", "pushed_at": "2011-01-26T19:06:43Z", "created_at": "2011-01-26T19:01:12Z", "updated_at": "2011-01-26T19:14:43Z", "permissions": { "admin": false, "push": false, "pull": true }, "allow_rebase_merge": true, "template_repository": null, "temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O", "allow_squash_merge": true, "allow_auto_merge": false, "delete_branch_on_merge": true, "allow_merge_commit": true, "subscribers_count": 42, "network_count": 0, "license": { "key": "mit", "name": "MIT License", "url": "https://api.github.com/licenses/mit", "spdx_id": "MIT", "node_id": "MDc6TGljZW5zZW1pdA==", "html_url": "https://github.com/licenses/mit" }, "forks": 1, "open_issues": 1, "watchers": 1 } ]}Requires authentication
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Validation Error
object
object
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}