> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dogebot.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Secrets

> Keep passwords and API keys safe, and use them in blocks.

Some blocks need a password or a key. For example, a **web request** to another website that needs an API key.

> [!WARNING]
>
> **Never** type keys straight into a block. Anyone who can see the block could copy them. Put them in **Secrets** instead.

## How to use a secret

**1. Open Secrets**

Open **Secrets** in the sidebar. In the builder, you can also use the **Secrets** panel in the side bar.

**2. Add a secret**

Give it a name, like `weather_key`, and paste the key.

**3. Use it in a block**

In your block, press the `{ }` **Variables** button and pick your secret from the list. Or type it yourself as `{secret.NAME}`.

> **Example**
>
> You saved a secret called `weather_key`. In a web request block, the address is:
>
> ```text theme={null}
> https://weather.example.com/today?key={secret.weather_key}
> ```
>
> When the bot runs, it puts the real key in. Nobody looking at the block can see it.

## Why secrets are safe

> **Hidden from collaborators**
>
> Collaborators cannot see the secret value.

> **Never in logs**
>
> Secrets are never shown in Error Logs or Replays.

> **No backup value**
>
> A secret never uses a backup value. If it is missing, nothing wrong is sent.

See [Web requests](/building-with-blocks/web-requests) to learn how to call other websites.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.