# List repository secrets

From **GitHub v3 REST API**.

`GET /repos/{owner}/{repo}/actions/secrets`

Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint.

## Parameters

### `owner`

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

### `repo`

- 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: `object`

```json
{
  "secrets": [
    {
      "created_at": "2019-08-10T14:59:22Z",
      "name": "GH_TOKEN",
      "updated_at": "2020-01-10T14:59:22Z"
    },
    {
      "created_at": "2020-01-10T10:59:22Z",
      "name": "GIST_ID",
      "updated_at": "2020-01-11T11:59:22Z"
    }
  ],
  "total_count": 2
}
```

```json
{"properties":{"secrets":{"items":{"$ref":"#/components/schemas/actions-secret"},"type":"array"},"total_count":{"type":"integer"}},"required":["total_count","secrets"],"type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/actions/secrets
```
