---
title: pydo.security.get_secret()
description: Get Secret
product: Reference
url: https://docs.digitalocean.com/reference/pydo/reference/security/get_secret/
last_updated: "2026-08-03"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# pydo.security.get_secret()

Generated on 3 Aug 2026 from `pydo` version [`v0.40.0`](https://github.com/digitalocean/pydo/releases/tag/v0.40.0v0.40.0)

## Usage

```python
client.security.get_secret(secret="my-database-password", region=None)
```

Returns `JSON`Raises `HttpResponseError`

## Description

To retrieve a secret and its values, send a GET request to [`/v2/security/secrets/{secret}`](https://docs.digitalocean.com/reference/api/reference/security/index.html.md#security_get_secret).

## Parameters

`secret` string required

The name of the secret.

`region` string optional

The slug identifier for the region where the resource is available.

One of: `ams1`, `ams2`, `ams3`, `blr1`, `fra1`, `lon1`, `nyc1`, `nyc2`, `nyc3`, `sfo1`, `sfo2`, `sfo3`, `sgp1`, `tor1`, `syd1`

## Response Example

## Show Response Example

```json
{
  "secret": "my-database-password",
  "region": "nyc3",
  "version": 1,
  "values": {
    "password": "s3cr3t"
  },
  "created_at": "2025-12-04T00:00:00Z",
  "updated_at": "2025-12-04T00:00:00Z",
  "delete_requested_at": "2025-12-04T00:00:00Z"
}
```

## More Information

See [`/v2/security/secrets/{secret}`](https://docs.digitalocean.com/reference/api/reference/security/index.html.md#security_get_secret) in the API reference for additional detail on responses, headers, parameters, and more.