Skip to main content
POST
Hosted Auth Link
返回一个 HostedAuthUrl,把终端用户引导到 Unipile 托管页完成 LinkedIn 登录,凭证不会经过你的系统。托管模式(推荐):不传 notify_url,AISA 全程代管——轮询 GET /apis/v1/unipile/me/accounts 直到账号出现(用户完成登录后通常几秒内),无需自建任何 webhook。自管模式:传入你自己的 notify_url,流程完成后 Unipile 会向它 POST 事件 {"status":"CREATION_SUCCESS","account_id":"…","name":"…"}——请保存 account_id,它是其余所有端点的必需标识(自管模式下没有账号列表端点可重新查询,托管模式用户直接读 me/accounts)。你设置的 name 会原样回传,用它把账号映射到你自己的用户。请在 30 秒内返回 200,否则事件会重试 5 次;建议在回调端点校验共享密钥头。链接会在 Unipile 每日重启时失效(无论 expiresOn 设成什么),每次用户要连接时都新生成一条。注意:同一 LinkedIn 账号重新授权会生成新的 account_id,旧绑定在断开前会一直保留在列表中。 参考价格:每次成功请求 $0.000001 USD。

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
type
enum<string>
必填

create connects a new account, reconnect re-authenticates an existing one.

可用选项:
create,
reconnect
providers
string[]
必填

Provider list, for example ["LINKEDIN"]. Only used with type=create.

api_url
string
必填

The Unipile server URL of this AIsa binding, for example https://api68.unipile.com:19823. Use the value documented here; a generic Unipile URL will not match the binding.

expiresOn
string
必填

ISO 8601 UTC expiry, for example 2026-12-31T23:59:59.999Z. Required by upstream, even though links also die on Unipile's daily restart.

name
string

Label echoed back in events so you can match the account to your own user.

notify_url
string

Callback notified once the connection completes.

success_redirect_url
string

Browser redirect after a successful connection.

failure_redirect_url
string

Browser redirect after a failed connection.

reconnect_account
string

Account id to re-authenticate. Required when type is reconnect.

bypass_success_screen
boolean

Skip Unipile's hosted success screen before the browser follows success_redirect_url.

disabled_features
string[]

Provider features to disable on the connected account: linkedin_recruiter, linkedin_sales_navigator, or linkedin_organizations_mailboxes.

响应

Success

object
enum<string>
可用选项:
HostedAuthUrl
url
string

Hosted authorization URL to send the user to.