---
title: "Youtube Ext Callback"
method: GET
path: "/social/youtube/ext-callback"
tags: ["Social"]
---

# Youtube Ext Callback

`GET /social/youtube/ext-callback`

## Request

- Base URL: `https://api.muapi.ai`
- URL: `https://api.muapi.ai/social/youtube/ext-callback`
- Auth: one of:
  - API key in header `x-api-key`
  - OAuth 2 (client credentials, token URL `https://api.muapi.ai/oauth/token`)

OAuth callback for developer-managed end-user YouTube connections.

Developers generate a connect URL via POST /api/v1/social/youtube/connect-url.
After the user consents, Google redirects here. The resulting
ConnectedSocialAccount is owned by the developer (user_id = developer's
muapi user_id) and tagged with external_user_id so they can look up and
publish to their users' channels later.

Register https://<HOST>/api/social/youtube/ext-callback as a redirect URI
in the Google Cloud Console alongside the standard /youtube/callback URI.

## Query parameters

- `code` string, required
- `state` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/muapi/apis/muapi-api.md) · [All operations](https://skmtc.dev/muapi/apis/muapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/muapi/apis/muapi-api/revisions/e4b7374381e5?raw)
