# List app installations accessible to the user access token

From **GitHub v3 REST API**.

`GET /user/installations`

Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access.

You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint.

The authenticated user has explicit permission to access repositories they own, repositories where they are a collaborator, and repositories that they can access through an organization membership.

You can find the permissions for the installation under the `permissions` key.

## Parameters

### `per_page`

- Location: query
- Required: false
- Type: `integer`
- Default: `30`

Results per page (max 100)

### `page`

- Location: query
- Required: false
- Type: `integer`
- Default: `1`

Page number of the results to fetch.

## Responses

### `200`

You can find the permissions for the installation under the `permissions` key.

#### Headers

##### `Link`

- Type: `string`

- Example: `<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"`

### `application/json`

- Type: `object`

```json
{
  "installations": [
    {
      "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
      "account": {
        "avatar_url": "https://github.com/images/error/octocat_happy.gif",
        "events_url": "https://api.github.com/users/octocat/events{/privacy}",
        "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}",
        "gravatar_id": "",
        "html_url": "https://github.com/octocat",
        "id": 1,
        "login": "octocat",
        "node_id": "MDQ6VXNlcjE=",
        "organizations_url": "https://api.github.com/users/octocat/orgs",
        "received_events_url": "https://api.github.com/users/octocat/received_events",
        "repos_url": "https://api.github.com/users/octocat/repos",
        "site_admin": false,
        "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
        "type": "User",
        "url": "https://api.github.com/users/octocat"
      },
      "app_id": 1,
      "app_slug": "github-actions",
      "created_at": "2017-07-08T16:18:44-04:00",
      "events": [
        "push",
        "pull_request"
      ],
      "has_multiple_single_files": true,
      "html_url": "https://github.com/organizations/github/settings/installations/1",
      "id": 1,
      "permissions": {
        "checks": "write",
        "contents": "read",
        "metadata": "read"
      },
      "repositories_url": "https://api.github.com/installation/repositories",
      "repository_selection": "all",
      "single_file_name": "config.yaml",
      "single_file_paths": [
        "config.yml",
        ".github/issue_TEMPLATE.md"
      ],
      "suspended_at": null,
      "suspended_by": null,
      "target_id": 1,
      "target_type": "Organization",
      "updated_at": "2017-07-08T16:18:44-04:00"
    },
    {
      "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
      "account": {
        "avatar_url": "https://github.com/images/error/octocat_happy.gif",
        "events_url": "https://api.github.com/users/octocat/events{/privacy}",
        "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}",
        "gravatar_id": "",
        "html_url": "https://github.com/octocat",
        "id": 2,
        "login": "octocat",
        "node_id": "MDQ6VXNlcjE=",
        "organizations_url": "https://api.github.com/users/octocat/orgs",
        "received_events_url": "https://api.github.com/users/octocat/received_events",
        "repos_url": "https://api.github.com/users/octocat/repos",
        "site_admin": false,
        "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
        "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
        "type": "User",
        "url": "https://api.github.com/users/octocat"
      },
      "app_id": 1,
      "app_slug": "github-actions",
      "created_at": "2017-07-08T16:18:44-04:00",
      "events": [
        "push",
        "pull_request"
      ],
      "has_multiple_single_files": true,
      "html_url": "https://github.com/organizations/github/settings/installations/1",
      "id": 3,
      "permissions": {
        "checks": "write",
        "contents": "read",
        "metadata": "read"
      },
      "repositories_url": "https://api.github.com/installation/repositories",
      "repository_selection": "all",
      "single_file_name": "config.yaml",
      "single_file_paths": [
        "config.yml",
        ".github/issue_TEMPLATE.md"
      ],
      "suspended_at": null,
      "suspended_by": null,
      "target_id": 1,
      "target_type": "Organization",
      "updated_at": "2017-07-08T16:18:44-04:00"
    }
  ],
  "total_count": 2
}
```

```json
{"properties":{"installations":{"items":{"$ref":"#/components/schemas/installation"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","installations"],"type":"object"}
```

### `304`

Not modified

### `401`

Requires authentication

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

### `403`

Forbidden

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

### `415`

Preview header missing

### `application/json`

- Type: `object`

```json
{"properties":{"documentation_url":{"type":"string"},"message":{"type":"string"}},"required":["message","documentation_url"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/user/installations
```
