Get connect URL

View .md

Get the URL where a user connects a social account.


Returns authorize_url, the temporary URL where you send the user to connect a social account. After consent, the platform calls Dravo's callback and Dravo creates the connected account.

Pass return_url to send the user back to your own app after connecting. The URL must be present in the platform credentials' 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 a connect URL for a social account. Redirect the user to authorize_url; after consent Dravo creates the connected account.

Authorizationstringheaderrequired

Bearer token. Use a Dravo API key (`dra_…`) or a dashboard JWT.

platformstringpathrequired

instagram | facebook | x | linkedin | tiktok.

oauth_app_idstringquery

Use a specific saved platform credential set; omit for the default.

return_urlstringquery

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

authorize_urlstring

Platform consent URL. Redirect the user here to start the BYOK OAuth flow.

Error codes

400

No platform credentials configured, 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=…"}