---
title: "List secrets for the authenticated user"
method: GET
path: "/user/codespaces/secrets"
tags: ["codespaces"]
---

# List secrets for the authenticated user

`GET /user/codespaces/secrets`

Lists all development environment secrets available for a user's codespaces without revealing their
encrypted values.

The authenticated user must have Codespaces access to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the `codespace` or `codespace:secrets` scope to use this endpoint.

## Query parameters

- `per_page` integer
- `page` integer

## Response `200`

Response

- object
  - `total_count` integer, required
  - `secrets` CodespacesSecret[], required
    - `name` string, required — The name of the secret
    - `created_at` string, date-time, required — The date and time at which the secret was created, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
    - `updated_at` string, date-time, required — The date and time at which the secret was last updated, in ISO 8601 format':' YYYY-MM-DDTHH:MM:SSZ.
    - `visibility` 'all' | 'private' | 'selected', required — The type of repositories in the organization that the secret is visible to
    - `selected_repositories_url` string, uri, required — The API URL at which the list of repositories this secret is visible to can be retrieved

---

[API](https://skmtc.net/github/apis/github-v3-rest-api.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api/revisions/a367f7028301/schema)
