# Retrieving API Key

*Article Topics:* [*Affiliates*](/getting-started/common-topics/affiliates.md)

## Finding your API Key in NATS

{% hint style="info" %}
**Please Note:** For security purposes, NATS will only show an existing API key to the admin account it belongs to.
{% endhint %}

You can generate a new API key for any admin-level account directly in the Affiliate Admin.

1. Log in to the affiliate account you need the API key for.
2. Navigate to the Affiliate Admin, then select the affiliate account.
3. Select the API tab, where you will find the API key in the General API Details section.

<figure><img src="/files/2olWxmOYUXKItdyUlLiU" alt=""><figcaption></figcaption></figure>

## Resetting an Admin's API Key

{% hint style="info" %}
**Please Note:** You do not need to be logged in as the affiliate account to reset the API key.
{% endhint %}

Use this when you do not need the old key and are okay with issuing a new one.&#x20;

1. Log in to an admin account.
2. Navigate to the Affiliate Admin, then select the affiliate account you wish to reset the API key for.
3. Select the API tab, where you will find the API key hidden and an option to reset the key next to it.

<figure><img src="/files/15JwAAkvNvaRZQTLVgMD" alt=""><figcaption></figcaption></figure>

4. Click "Reset"
5. A confirmation modal will appear and refresh to show the new key.

<figure><img src="/files/Myz38lcnG3dFA6Idf3uB" alt=""><figcaption></figcaption></figure>

6. Copy the new key and store it securely.&#x20;

{% hint style="info" %}
**Important:** You will only be able to see this modal once.&#x20;
{% endhint %}

<figure><img src="/files/4EK1t4UKRwHjIRq7LWpE" alt=""><figcaption></figcaption></figure>

Anything using the old key will fail until you update it with the new API key.

## Related Articles

{% content-ref url="/pages/eLE5KhKhYac4R1XMX5sp" %}
[Affiliates](/nats-admin/affiliates.md)
{% endcontent-ref %}


---

# 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.toomuchmedia.com/nats-admin/affiliates/further-reading/retrieving-api-key.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.
