Documentation menu
Connect

Start connection

Start a hosted OAuth connection and get the URL to send your customer to.

POSThttps://app.tryadeli.com/api/v1/profiles/{profileId}/connect
AuthorizationBearer <API key>How keys work

Body

platform"instagram" | "tiktok" | "tiktok_ads" | "facebook" | "youtube" | "x" | "bluesky" | "linkedin" | "linkedin_ads"Required
tiktok_ads connects TikTok Ads, the advertiser authorization the Ads endpoints use; it is separate from tiktok, which posts. LinkedIn connects a personal profile or one eligible organization Page; linkedin_ads connects LinkedIn Ads, separately from it. X returns 402 x_billing_required on Free, and WhatsApp and Bluesky need a paid plan too; see X API pricing. WhatsApp and Google Business Profile are accepted by the schema but return 422 provider_not_supported. A business connects its WhatsApp number itself, through Embedded Signup on the dashboard's Accounts page.
redirectUrlstring
Where to send the browser when authorization finishes. It must exactly match a URI registered under the API key organization's Settings → OAuth, and use HTTPS unless the host is localhost or 127.0.0.1. See OAuth setup. Omit it to poll only.
authMethod"unified_login" | "instagram_login" | "facebook_login"
Instagram only, and optional. instagram_login (the default) has your customer sign in on Instagram; facebook_login connects through the Facebook Page linked to the account. A profile's Instagram uses one of the two, and the other returns 409 auth_method_conflict until it is disconnected. unified_login is accepted and starts an Instagram Login connect. See Instagram login methods. Sending it with any other platform returns 400 invalid_request.
capabilitiesstring[]
Instagram only, and optional. What your product will do with the account, so the consent screen asks only for those permissions: any of profile.read, feed.read, post.publish, analytics.read, post.analytics, comments.read, comments.manage, inbox.read, inbox.send. Leave it out to ask for everything. See Request only what you need.
forceReauthboolean
Instagram only, and optional, default true: Instagram Login asks your customer to log in again even when their browser is already logged in, so they can pick another account. false skips that, which is faster. Facebook Login never forces a login.
handlestring
Bluesky only, and optional: your customer's handle, such as alice.example.com, or their DID. The connect then starts at the server their account lives on. Leave it out for accounts hosted on Bluesky itself (*.bsky.social and most custom domains), which sign in at bsky.social. See Bluesky. Sending it with any other platform returns 400 invalid_request.

A successful start returns 201.

Instagram sessions also carry an authMethod, the login the session runs, and requestedPermissions, what the consent screen asks for.

LinkedIn connects either the member's own personal profile or one organization Page they administer. A member who administers at least one eligible Page is redirected to an Adeli-hosted chooser after consent, listing their personal profile first and then each Page. Keep polling while that browser step is open: the session remains processing and becomes connected only after one account is selected. The final redirect includes its accountId. A member with no eligible Page connects their personal profile automatically.

Errors — 401 unauthorized, 400 invalid_request, 400 invalid_redirect_uri, 404 profile_not_found, 409 auth_method_conflict, 402 billing_required (the account doesn't fit the workspace's plan; the same check runs again when the connection finishes, so a session can also end failed with that code; see Billing), 422 provider_not_supported, 422 provider_not_configured, 422 provider_not_available, 502 database_error.