> For the complete documentation index, see [llms.txt](https://docs.treeofalpha.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.treeofalpha.com/websockets/api-key.md).

# API Key

#### **Connecting to Tree News WebSockets: API Key Setup**

To connect to Tree News WebSockets, you will need an **API key**.

***

#### **How to Obtain Your API Key**

1. **Sign in with Discord**
   * Go to [**Tree News**](https://news.treeofalpha.com/) and log in using your **Discord account**.
2. **Access Your API Key**\
   You can retrieve your API key through either of these methods:
   * **API Endpoint**:

     ```
     https://news.treeofalpha.com/api/api_key
     ```
   * **Discord Bot**:
     * Send `"api"` to **"Managey Boi"** in the Tree Discord server.
   * **Account Tab:**
     * <https://news.treeofalpha.com/account>
3. **Regenerating Your API Key**
   * If you need a new API key, send `"renew_api"` to **"Managey Boi"** in Discord.
   * Your API key remains **the same** unless you manually request a renewal.

***

#### **Quickstart Guides**

* [**Python**](/websockets/python-connection.md)
* [**JavaScript**](/websockets/javascript-connection.md)
