# Secret

## *class* <mark style="color:purple;">Secret</mark>

An interface for working with secrets on Redivis, which can either be stored under an organization or user. In order to access organization secrets, you must be an administrator of that organization.

{% hint style="warning" %}
Secrets can currently only be accessed from within a Redivis notebook. If your use case requires external access to secrets, please contact <support@redivis.com> to tell us more about alternate use cases.
{% endhint %}

## Constructors

<table data-header-hidden><thead><tr><th width="368">Method</th><th>Description</th></tr></thead><tbody><tr><td><a href="organization/organization.secret"><strong><code>organization.secret</code></strong></a>(name)</td><td>Create a reference to a secret owned by an organization.</td></tr><tr><td><a href="user/user.secret"><strong><code>user.secret</code></strong></a>(name)</td><td>Create a reference to a secret owned by a user.</td></tr></tbody></table>

## Examples

```python
# secrets are case-sensitive
secret = redivis.user("my_username").secret("EXTERNAL_API_TOKEN")

# Avoid printing secrets, but rather pass them to other methods as needed
make_http_request("https://example.com/api", auth_token=secret.get_value())
```

## Methods

<table data-header-hidden><thead><tr><th width="421">Name</th><th>Description</th></tr></thead><tbody><tr><td><a href="notebook/notebook.create_output_table"><strong><code>secret.get_value()</code></strong></a>()</td><td>Get the value of a secret, as a string</td></tr></tbody></table>
