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. TikTok Ads is in beta: the production API returns 422 provider_not_configured for it. 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.
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.

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.