# Secret$get\_value

### Secret$<mark style="color:purple;">get\_value</mark>() → string

Returns the stored value of a secret as a string.

{% hint style="warning" %}
This method is currently only available 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 %}

### Returns

**string**

### Examples

```r
# 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())
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redivis.com/api/client-libraries/redivis-r/reference/secret/secretusdget_value.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
