---
title: "Social Facebook Connect Url"
method: POST
path: "/api/v1/social/facebook/connect-url"
tags: ["API"]
---

# Social Facebook Connect Url

`POST /api/v1/social/facebook/connect-url`

## Request

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

Generate a Facebook OAuth URL that the developer can redirect their end-user to.

After the user authorizes, the resulting connected account is keyed by
external_user_id and can be listed via GET /api/v1/social/ext/accounts
and used with POST /api/v1/facebook-publish.

## Query parameters

- `team_id` integer, nullable

## Headers

- `x-api-key` string
- `x-embed-code` string, nullable
- `x-agent-embed-code` string, nullable
- `x-whitelabel-studio` string, nullable
- `authorization` string, nullable

## Request body

- FacebookConnectUrlRequest
  - `external_user_id` string, required: Your identifier for the end-user whose Facebook Page should be connected (e.g. a user id from your own system).
  - `redirect_to` string, nullable: URL to redirect the user to after they complete the OAuth consent screen. Must be a full URL (e.g. https://yourapp.com/connected).

## 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)
