---
title: "Start OAuth flow"
description: "Get the platform authorize URL to connect an account interactively."
section: "API reference"
url: https://dravo.dev/docs/api/oauth/start
---
# Start OAuth flow

Returns the platform authorize URL; redirect the user there. After consent the
platform calls Dravo's callback and the account is connected. The callback is
handled by Dravo and needs no auth (the state is signed).

Pass `return_url` to send the user back to your own app after connecting. The URL
must be present in the OAuth app's `allowed_return_urls` allowlist (matched by
origin + path prefix); otherwise the request is rejected with `400`. Without a
`return_url` the user lands on the Dravo dashboard.

#### `GET /v1/oauth/{platform}/start`

Get the platform authorize URL to redirect the user into the OAuth consent screen. With an API key you can start the flow for your own users (Connect): pass return_url to send them back to your app.

**Auth:** API key (`dra_…`) or dashboard JWT

| Field | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `platform` | path | string | yes | instagram \| facebook \| x \| linkedin \| tiktok. |
| `oauth_app_id` | query | string | no | Use a specific BYOK OAuth app; omit for the default. |
| `return_url` | query | string | no | Where to send the user after connecting. Must match the OAuth app's allowed_return_urls (origin + path prefix); otherwise 400. |

Response `200`: Authorize URL.

```json
{
  "authorize_url": "https://www.tiktok.com/v2/auth/authorize/?client_key=…"
}
```

Errors:

- `400`: No OAuth app configured for the platform, or return_url is not in the allowlist.
