Start OAuth flow

View .md

Get the platform authorize URL to connect an account interactively.


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
API key (dra_…) or dashboard JWT

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.

Body & query parameters

platformstringpathrequired

instagram | facebook | x | linkedin | tiktok.

oauth_app_idstringquery

Use a specific BYOK OAuth app; omit for the default.

return_urlstringquery

Where to send the user after connecting. Must match the OAuth app's allowed_return_urls (origin + path prefix); otherwise 400.

Error codes

400

No OAuth app configured for the platform, or return_url is not in the allowlist.

const response = await fetch("https://api.dravo.dev/v1/oauth/{platform}/start", {  method: "GET",  headers: {  "Authorization": "Bearer " + process.env.DRAVO_API_KEY,}});const data = await response.json();console.log(data);
{  "authorize_url": "https://www.tiktok.com/v2/auth/authorize/?client_key=…"}