---
title: "Youtube Setup"
method: POST
path: "/api/channels/youtube/setup"
tags: ["channels", "channels", "youtube"]
---

# Youtube Setup

`POST /api/channels/youtube/setup`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/channels/youtube/setup`
- Auth: none declared

Start the BYO OAuth flow. Returns `{auth_url, state}`.

Frontend opens `auth_url` in a popup. Google redirects back to
`youtube_redirect_uri()` with `?code=...&state=...`; that route
completes the flow.

## Request body

- SetupRequest
  - `client_id` string, required: GCP OAuth Client ID (workspace's BYO project)
  - `client_secret` string, required: GCP OAuth Client Secret
  - `redirect_after` string, nullable: Optional URL the popup should redirect to after callback handling

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/77bef09a9209?raw)
