# Twitch — Pipedream Connect

> Twitch is an interactive livestreaming service for content spanning gaming, entertainment, sports, music, and more.

- API slug: `twitch` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Entertainment
- Website: https://www.twitch.tv/
- Managed OAuth scopes: `analytics:read:extensions` · `analytics:read:games` · `bits:read` · `channel:read:subscriptions` · `clips:edit` · `user:edit` · `user:edit:broadcast` · `user:read:broadcast` · `user:read:email` · `user:read:follows` · `user:read:blocked_users` · `user:manage:blocked_users` · `moderator:read:followers` · `channel:read:editors` · `channel:manage:videos` · `user:read:subscriptions`
- This page (HTML): https://pipedream.com/apps/twitch
- Tools: 17 actions · 8 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: twitch`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "twitch",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Block User:
const result = await mcp.callTool({
  name: "twitch-block-user",
  arguments: {
    user: "User",
    sourceContext: "Source Context",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Twitch endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.twitch.tv/helix/users

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkudHdpdGNoLnR2L2hlbGl4L3VzZXJz?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "twitch-block-user",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    twitch: { authProvisionId: "apn_xxxxxxx" },
    user: "User",
    sourceContext: "Source Context",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (17)

### `twitch-block-user` — Block User (Write)

Blocks the specified user. See the documentation

Full schema: https://pipedream.com/apps/twitch/actions/block-user.md

### `twitch-check-channel-subscription` — Check Channel Subscription (Read-only)

Checks if you are subscribed to the specified broadcaster's channel. See the documentation

Full schema: https://pipedream.com/apps/twitch/actions/check-channel-subscription.md

### `twitch-delete-video` — Delete Video (Write)

Deletes a specified video

Full schema: https://pipedream.com/apps/twitch/actions/delete-video.md

### `twitch-get-channel-editors` — Get Channel Editors (Read-only)

Gets a list of users who are editors for your channel

Full schema: https://pipedream.com/apps/twitch/actions/get-channel-editors.md

### `twitch-get-channel-followers` — Get Channel Followers (Read-only)

Retrieves a list of users who follow the authenticated user. See the documentation

Full schema: https://pipedream.com/apps/twitch/actions/get-channel-followers.md

### `twitch-get-channel-information` — Get Channel Information (Read-only)

Retrieves information about a particular broadcaster's channel

Full schema: https://pipedream.com/apps/twitch/actions/get-channel-information.md

### `twitch-get-channel-teams` — Get Channel Teams (Read-only)

Gets a list of teams to which a specified channel belongs

Full schema: https://pipedream.com/apps/twitch/actions/get-channel-teams.md

### `twitch-get-clips` — Get Clips (Read-only)

Gets clip information by clip ID, user ID, or game ID

Full schema: https://pipedream.com/apps/twitch/actions/get-clips.md

### `twitch-get-followed-channels` — Get Followed Channels (Read-only)

Retrieves a list of channels that the authenticated user follows. See the documentation

Full schema: https://pipedream.com/apps/twitch/actions/get-followed-channels.md

### `twitch-get-stream-by-user` — Get Stream By User (Read-only)

Gets stream information for the specified user. See the documentation

Full schema: https://pipedream.com/apps/twitch/actions/get-stream-by-user.md

### `twitch-get-top-games` — Get Top Games (Read-only)

Gets games sorted by number of current viewers on Twitch, most popular first

Full schema: https://pipedream.com/apps/twitch/actions/get-top-games.md

### `twitch-get-users` — Get Users (Read-only)

Gets the user objects for the specified Twitch login names

Full schema: https://pipedream.com/apps/twitch/actions/get-users.md

### `twitch-get-videos` — Get Videos (Read-only)

Gets video information by video ID, user ID, or game ID. See the documentation

Full schema: https://pipedream.com/apps/twitch/actions/get-videos.md

### `twitch-search-channels` — Search Channels (Read-only)

Returns a list of channels (users who have streamed within the past 6 months) that match the query via channel name or description either entirely or partially. Results include both live and offline channels.

Full schema: https://pipedream.com/apps/twitch/actions/search-channels.md

### `twitch-search-games` — Search Games (Read-only)

Searches for games based on a specified query parameter. A game is returned if the query parameter is matched entirely or partially in the channel description or game name

Full schema: https://pipedream.com/apps/twitch/actions/search-games.md

### `twitch-unblock-user` — Unblock User (Write)

Unblocks the specified user. See the documentation

Full schema: https://pipedream.com/apps/twitch/actions/unblock-user.md

### `twitch-update-channel` — Update Channel (Write)

Update information for the channel owned by the authenticated user. At least one parameter must be provided.

Full schema: https://pipedream.com/apps/twitch/actions/update-channel.md

## Triggers (8)

### `twitch-new-clip-by-streamer` — New Clip By Streamer (Polling)

Emit new event when there is a new clip for the specified streamer.

Full schema: https://pipedream.com/apps/twitch/triggers/new-clip-by-streamer.md

### `twitch-new-clips` — New Clips (Polling)

Emit new event when there is a new clip for the specified game.

Full schema: https://pipedream.com/apps/twitch/triggers/new-clips.md

### `twitch-followed-streams` — New Followed Streams (Polling)

Emit new event when a followed stream is live.

Full schema: https://pipedream.com/apps/twitch/triggers/followed-streams.md

### `twitch-new-follower` — New Follower (Polling)

Emit new event when a new user follows your channel.

Full schema: https://pipedream.com/apps/twitch/triggers/new-follower.md

### `twitch-streams-by-game` — New Streams By Game (Polling)

Emit new event when a live stream starts from any stream matching the game and language specified.

Full schema: https://pipedream.com/apps/twitch/triggers/streams-by-game.md

### `twitch-streams-by-streamer` — New Streams By Streamer (Polling)

Emit new event when a live stream starts from the streamers you specify.

Full schema: https://pipedream.com/apps/twitch/triggers/streams-by-streamer.md

### `twitch-new-subscriber` — New Subscriber (Polling)

Emit new event when a new user subscribes to your channel.

Full schema: https://pipedream.com/apps/twitch/triggers/new-subscriber.md

### `twitch-new-videos` — New Videos (Polling)

Emit new event when there is a new video from channels you follow.

Full schema: https://pipedream.com/apps/twitch/triggers/new-videos.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
