# GitHub accounts the connected access can create repositories in.

> Through whichever GitHub access serves the workspace now (`access`: the App's installation, or the legacy token).
> https://koi.dog/docs/api/github/list-git-hub-accounts/

`GET /api/v1/github/accounts` · Scope: `read`

With the token: its own user and the organizations it belongs to, each with `canCreate` (`yes`, `no` with `reason` and `missingPermission`, or `unknown` when GitHub does not say before trying). With the App: each linked account it is installed on, the personal account first, then organizations in plain ASCII order, each with its installation's `manageUrl`; an organization whose installation grants `administration:write` can create (D89), a personal account never. `missingPermissions` names what the access lacks for this list itself (`read:org`). Read from GitHub at most every few minutes. With the legacy token only the workspace's owner, signed in, may read it: never an API key or a limited CLI sign-in, whatever its scopes (`403 not_allowed`). `409 github_access_required` without any GitHub access; `503 github_unavailable` when GitHub cannot be asked; `429 rate_limited` when GitHub, or Koidog's limit on calls to it, says wait.

## Response.

200 OK · JSON object

## Request.

```sh
curl https://api.koi.dog/api/v1/github/accounts \
    -H "Authorization: Bearer $KOIDOG_API_KEY"
```

```js
const res = await fetch("https://api.koi.dog/api/v1/github/accounts", {
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
  },
});
console.log(await res.json());
```

```python
import os

import requests

r = requests.get(
    "https://api.koi.dog/api/v1/github/accounts",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "access": "app",
  "login": "string",
  "accounts": [],
  "missingPermissions": [],
  "checkedAt": "string"
}
```
