List secrets for the authenticated user
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.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “ Query Parameters ”The number of results per page (max 100). For more information, see “Using pagination in the REST API.”
The page number of the results to fetch. For more information, see “Using pagination in the REST API.”
Responses
Section titled “ Responses ”Response
object
Secrets for a GitHub Codespace.
object
The name of the secret
The date and time at which the secret was created, in ISO 8601 format’:’ YYYY-MM-DDTHH:MM:SSZ.
The date and time at which the secret was last updated, in ISO 8601 format’:’ YYYY-MM-DDTHH:MM:SSZ.
The type of repositories in the organization that the secret is visible to
The API URL at which the list of repositories this secret is visible to can be retrieved
Examples
{ "total_count": 2, "secrets": [ { "name": "GH_TOKEN", "created_at": "2019-08-10T14:59:22Z", "updated_at": "2020-01-10T14:59:22Z", "visibility": "all" }, { "name": "GIST_ID", "created_at": "2020-01-10T10:59:22Z", "updated_at": "2020-01-11T11:59:22Z", "visibility": "all" } ]}Headers
Section titled “ Headers ”Example
<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"