# Reddit

> Connect Reddit to your agents for posts, comments, and messages.

**URL:** https://inference.sh/docs/credentials/reddit
**Last updated:** 2026-09-24

---

Connect Reddit to your agents for posts, comments, and messages.

---

## Overview

A Reddit credential lets agents read subreddit content, submit posts and comments, vote, and access private messages.

### Why "Bring Your Own Key" (BYOK)?

Reddit OAuth apps are registered under your Reddit account. BYOK keeps credentials and API access under your control.

**Benefits:**

- **Your app** — registered at reddit.com/prefs/apps under your account
- **Scoped permissions** — request only the OAuth scopes your agents need
- **Your rate limits** — API usage counts against your app's quota

---

## Prerequisites

Before connecting, you'll need:

1. A Reddit account
2. A Reddit app registered at [reddit.com/prefs/apps](https://www.reddit.com/prefs/apps)

---

## Step 1: Create a Reddit app

1. Go to [reddit.com/prefs/apps](https://www.reddit.com/prefs/apps)
2. Click **create another app...** (or **create app**)
3. Choose **web app** as the app type
4. Set the redirect URI:

| Environment | Callback URL |
|-------------|-------------|
| Production | `https://app.inference.sh/settings/secrets/oauth/reddit` |
| Staging | `https://app.staging.inference.sh/settings/secrets/oauth/reddit` |
| Local dev | `http://localhost:3000/settings/secrets/oauth/reddit` |

5. Save and copy the **client ID** (under the app name) and **client secret**

---

## Step 2: Connect in inference shell

### Configure credentials

1. Go to **vaults → credentials**
2. Find **Reddit** and click **Configure**
3. Enter:
   - **Client ID** (`REDDIT_CLIENT_ID`)
   - **Client Secret** (`REDDIT_CLIENT_SECRET`)
4. Click **Save credentials**

### Authorize the connection

1. Click **Connect**
2. Sign in to Reddit and approve the requested permissions
3. Done — the credential status shows **Connected**

---

## Capabilities

| Capability | Description | Required Scopes |
|------------|-------------|-----------------|
| `reddit.read` | Read posts, comments, and listings | `identity`, `read` |
| `reddit.history` | Read voting and comment history | `identity`, `read`, `history` |
| `reddit.submit` | Submit links and comments | `identity`, `read`, `submit` |
| `reddit.vote` | Submit and change votes | `identity`, `vote` |
| `reddit.privatemessages` | Access inbox and send messages | `identity`, `privatemessages` |

---

## Using in apps

Declare Reddit requirements in your app:

```yaml
# inf.yml
credentials:
  - key: reddit.read
    description: Monitor subreddit posts

  - key: reddit.submit
    description: Post comments on behalf of the user
    optional: true
```

At runtime, your app receives:

```bash
REDDIT_ACCESS_TOKEN=oauth2-access-token
REDDIT_ACCESS_TOKEN_EXPIRES_AT=2026-06-03T12:00:00Z
```

Use the token with the [Reddit OAuth API](https://www.reddit.com/dev/api/oauth).

---

## Next

→ [Credentials overview](/docs/credentials/overview)  
→ [Using credentials in apps](/docs/extend/credentials)
