跳转到主要内容
POST
Hosted Auth Link (temp verification)
返回一个 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,旧绑定在断开前会一直保留在列表中。 当前价格请查看费用说明;支持报价的接口可按实际请求获取报价。

请求规范

  • 方法与路径: POST /apis/v1/unipile/hosted/link
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/unipile/hosted/link
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

费用与请求规则

公开参考价格:每次成功请求 $0.000001 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。

授权

Authorization
string
header
必填

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

请求体

application/json
api_url
any
必填

The url of your Unipile server : https://{subdomain}.unipile.com:{port}

expiresOn
string
必填

An ISO 8601 UTC datetime (YYYY-MM-DDTHH:MM:SS.sssZ). ⚠️ All links expire upon daily restart, regardless of their stated expiration date. A new link must be generated each time a user clicks on your app to connect.

Pattern: ^[1-2]\d{3}-[0-1]\d-[0-3]\dT\d{2}:\d{2}:\d{2}.\d{3}Z$
示例:

"2025-12-31T23:59:59.999Z"

providers
必填

The providers for whom you want to propose to connect an account.

可用选项:
*
type
enum<string>
必填

A litteral value to choose between a connection or a reconnection.

可用选项:
create
bypass_success_screen
boolean

Whether to bypass the hosted auth success screen before accessing the success_redirect_url.

disabled_features
enum<string>[]

An array of features that should be disabled in this account. Accepted values : linkedin_recruiter | linkedin_sales_navigator | linkedin_organizations_mailboxes.

可用选项:
linkedin_recruiter,
linkedin_sales_navigator,
linkedin_organizations_mailboxes
disabled_options
enum<string>[]

An array of options that should be disabled in hosted auth interface. Accepted values : proxy | autoproxy | cookie_auth | credentials_auth | qrcode_auth | pairing_code_auth | sync_limit | language. qrcode_auth and pairing_code_auth are currently supported for WhatsApp only.

可用选项:
proxy,
autoproxy,
cookie_auth,
credentials_auth,
qrcode_auth,
pairing_code_auth,
sync_limit,
language
failure_redirect_url
any

A url where you might want to redirect the user in case of a failed authentication.

google_scopes
string<googleScopes>

Optional comma-separated list of scopes to use for GOOGLE_OAUTH accounts

microsoft_scopes
string<microsoftScopes>

Optional comma-separated list of scopes to use for OUTLOOK accounts.

To enable delegated mailbox authentication, Include Mail.ReadWrite.Shared, Mail.Send.Shared, Contacts.Read.Shared, and User.ReadBasic.All.

name
string

This field will be sent back to you in the notify_url to help match the added account with your user.

Minimum string length: 1
notify_url
any

A url where you can be notified about events related to the authentication process.

proxy
object
single_use
boolean

Whether the hosted authentication link can be used to connect only one account. Defaults to false.

success_redirect_url
any

A url where you might want to redirect the user in case of a successful authentication.

sync_limit
object

响应

OK. Request succeeded.

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

A url redirecting to Unipile's hosted authentication for account connection or reconnection.