# List teams for the authenticated user

From **GitHub v3 REST API**.

`GET /user/teams`

List all of the teams across all of the organizations to which the authenticated user belongs. This method requires `user`, `repo`, or `read:org` [scope](https://docs.github.com/enterprise-server@3.0/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.0/apps/building-oauth-apps/).

## 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`

Response

#### 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: `array`

```json
[
  {
    "created_at": "2017-07-14T16:53:42Z",
    "description": "A great team.",
    "html_url": "https://github.com/orgs/github/teams/justice-league",
    "id": 1,
    "ldap_dn": "uid=asdf,ou=users,dc=github,dc=com",
    "members_count": 3,
    "members_url": "https://api.github.com/teams/1/members{/member}",
    "name": "Justice League",
    "node_id": "MDQ6VGVhbTE=",
    "organization": {
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "blog": "https://github.com/blog",
      "company": "GitHub",
      "created_at": "2008-01-14T04:33:35Z",
      "description": "A great organization",
      "email": "octocat@github.com",
      "events_url": "https://api.github.com/orgs/github/events",
      "followers": 20,
      "following": 0,
      "has_organization_projects": true,
      "has_repository_projects": true,
      "hooks_url": "https://api.github.com/orgs/github/hooks",
      "html_url": "https://github.com/octocat",
      "id": 1,
      "issues_url": "https://api.github.com/orgs/github/issues",
      "location": "San Francisco",
      "login": "github",
      "members_url": "https://api.github.com/orgs/github/members{/member}",
      "name": "github",
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
      "public_gists": 1,
      "public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
      "public_repos": 2,
      "repos_url": "https://api.github.com/orgs/github/repos",
      "type": "Organization",
      "url": "https://api.github.com/orgs/github"
    },
    "parent": null,
    "permission": "admin",
    "privacy": "closed",
    "repos_count": 10,
    "repositories_url": "https://api.github.com/teams/1/repos",
    "slug": "justice-league",
    "updated_at": "2017-08-17T12:37:15Z",
    "url": "https://api.github.com/teams/1"
  }
]
```

```json
{"items":{"$ref":"#/components/schemas/team-full"},"type":"array"}
```

### `304`

Not modified

### `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"}
```

### `404`

Resource not found

### `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"}
```

## Request examples

### cURL

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