> For the complete documentation index, see [llms.txt](https://runtimedesigns.gitbook.io/token-buzz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://runtimedesigns.gitbook.io/token-buzz/connecting-data-byok/reddit.md).

# Reddit

TokenBuzz uses the official Reddit API for post search. Because Reddit no longer issues shared project keys for commercial use, each user must supply their own Reddit "script" application credentials: a `client_id` and a `client_secret`.

## What you'll need

* A Reddit account.
* A Reddit "script" app registered under your account (takes about two minutes).
* The app's **Client ID** and **Client secret**.

## Get your credentials

1. Log in to Reddit and navigate to <https://www.reddit.com/prefs/apps>.
2. Scroll to the bottom and click **"create another app…"**.
3. Fill in any name (e.g. "TokenBuzz"). Under **type**, select **script**.
4. Set the **redirect URI** to `http://localhost:8080` — this value is required by Reddit but is never called by TokenBuzz.
5. Click **Create app**.
6. Reddit displays your new app. The **Client ID** is the short string shown directly under the app name (below the "personal use script" label). The **Client secret** is the longer string labeled "secret".
7. Copy both values.

## Connect in TokenBuzz

1. In TokenBuzz, open **Account → API Keys**.
2. Make sure the mode selector is set to **Per-source keys**.
3. Select the **Reddit** tab.
4. Paste your **Client ID** into the first field and your **Client secret** into the second field.
5. Click **Validate & save**. TokenBuzz uses your credentials to obtain an app-only OAuth token from Reddit and verifies it before storing. You'll see a confirmation card showing the last four characters of the stored credential and the validation date.
6. Optionally enable **Use my key for background polling** to have TokenBuzz automatically refresh your watchlist tokens in the background using your Reddit credentials (default polling interval is approximately 20 minutes).

To remove the credentials, click **Remove key** on the configured card.

## Security & notes

* Both the Client ID and Client secret are combined and encrypted with AWS KMS before being stored. Only the last four characters of the combined credential are shown in the UI.
* Credentials can be rotated by removing the existing entry and saving a new one.
* Reddit enforces a quota of 100 queries per minute on script apps. TokenBuzz respects `Retry-After` and `X-Ratelimit` headers and backs off automatically.
* If Reddit returns a 401 or 403, TokenBuzz marks the key as invalid and notifies you by email.
* Reddit's Data API terms of service apply to your usage. Review the [Reddit Data API Wiki](https://support.reddithelp.com/hc/en-us/articles/16160319875092-Reddit-Data-API-Wiki) for details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://runtimedesigns.gitbook.io/token-buzz/connecting-data-byok/reddit.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
