Add platform credentials

View .md

Store the client_id and client_secret from your platform app.


Store the client_id and client_secret from your own platform developer app. This is required before Dravo can generate connect URLs for that platform. The secret is encrypted at rest.

To send users back to your product after connecting, set allowed_return_urls. Only URLs in this allowlist can be used as return_url in the connect URL flow.

POST/v1/oauth-apps
API key (dra_…) or dashboard JWT

Add platform credentials (your client_id/client_secret). The secret is encrypted and never returned.

Authorizationstringheaderrequired

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

Content-Typestringheaderrequired

Must be `application/json` for requests with a JSON body.

platformstringrequired

instagram | facebook | x | linkedin | tiktok.

namestringrequired

1 to 120 chars.

client_idstringrequired

Your platform app's client id / client key.

client_secretstringrequired

Your platform app's client secret (stored encrypted).

allowed_return_urlsstring[]

Allowlist (up to 20) of URLs the Connect flow may redirect users back to. Matched by origin + path prefix.

idstring

OAuth app id.

platformstring

Platform this app authenticates.

namestring

Label you gave this app.

client_idstringoptional

Your platform app client id.

redirect_uristring

Backend callback to register on your platform app.

scopesstring[]

Scopes Dravo will request.

allowed_return_urlsstring[]

Allowlisted return URLs for the Connect flow.

const response = await fetch("https://api.dravo.dev/v1/oauth-apps", {  method: "POST",  headers: {  "Authorization": "Bearer " + process.env.DRAVO_API_KEY,  "Content-Type": "application/json",},  body: JSON.stringify({  "platform": "x",  "name": "My X App",  "client_id": "…",  "client_secret": "…",  "allowed_return_urls": [    "https://app.acme.com/connect"  ]})});const data = await response.json();console.log(data);
{  "id": "oa_1",  "platform": "x",  "name": "My X App",  "client_id": "…",  "redirect_uri": "https://api.dravo.dev/v1/oauth/x/callback",  "scopes": [    "tweet.write",    "tweet.read",    "users.read",    "offline.access",    "media.write"  ],  "allowed_return_urls": [    "https://app.acme.com/connect"  ]}