Connect account (OAuth)

Starts an OAuth account connection flow by returning an auth_url you open in the browser. Use this for OAuth platforms like LinkedIn, X, YouTube, Instagram, Threads, TikTok, Pinterest, and beta Facebook Page connections, then list accounts afterward to find the new UniPost account ID.
https://api.unipost.dev
POST/v1/oauth/connect
Authorization
In header ยท Bearer <token>
Request Body
string

Authorization

AuthorizationBearer <token>In header
Workspace API key.

Request Body

profile_id?string
Profile that should own the connected account. Required when the workspace has multiple profiles.
platformstring
OAuth platform key. Facebook Page OAuth is beta/admin-gated; Bluesky uses direct credentials instead.
Valuestwitter | linkedin | instagram | threads | youtube | tiktok | pinterest | facebook
redirect_url?string
Optional app URL where the browser should land after OAuth completes.

Response Body

200
auth_urlstring
Browser URL to open for the OAuth authorization flow.
401
error.codestring
Common values include "UNAUTHORIZED", "VALIDATION_ERROR", and "FACEBOOK_DISABLED".
error.normalized_codestring
Lowercase alias such as "unauthorized" or "validation_error".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
403
error.codestring
Common values include "UNAUTHORIZED", "VALIDATION_ERROR", and "FACEBOOK_DISABLED".
error.normalized_codestring
Lowercase alias such as "unauthorized" or "validation_error".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
422
error.codestring
Common values include "UNAUTHORIZED", "VALIDATION_ERROR", and "FACEBOOK_DISABLED".
error.normalized_codestring
Lowercase alias such as "unauthorized" or "validation_error".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.
500
error.codestring
Common values include "UNAUTHORIZED", "VALIDATION_ERROR", and "FACEBOOK_DISABLED".
error.normalized_codestring
Lowercase alias such as "unauthorized" or "validation_error".
error.messagestring
Human-readable error message.
request_idstring
Request identifier for debugging and support.