---
title: "Get an environment secret"
method: GET
path: "/repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"
tags: ["actions"]
---

# Get an environment secret

`GET /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}`

Gets a single environment secret without revealing its encrypted value.

Authenticated users must have collaborator access to a repository to create, update, or read secrets.

OAuth tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.

## Path parameters

- `owner` string, required
- `repo` string, required
- `environment_name` string, required
- `secret_name` string, required

## Response `200`

Response

- ActionsSecret — Set secrets for GitHub Actions.
  - `name` string, required — The name of the secret.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Changes

- **2024-03-04** (3.8) `1dfb81fd25a6` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/github/apis/enterprise-server/changes/repos/:owner/:repo/environments/:environment_name/secrets/:secret_name/get.md)

---

[API](https://skmtc.dev/github/apis/enterprise-server.md) · [All operations](https://skmtc.dev/github/apis/enterprise-server/llms.txt) · [OpenAPI document](https://skmtc.dev/github/apis/enterprise-server/revisions/5438365412fe?raw)
