# List public keys for a user

From **GitHub v3 REST API**.

`GET /users/{username}/keys`

Lists the _verified_ public SSH keys for a user. This is accessible by anyone.

## Parameters

### `username`

- Location: path
- Required: true
- Type: `string`

### `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
[
  {
    "id": 1,
    "key": "ssh-rsa AAA..."
  }
]
```

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

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/users/{username}/keys
```
