curl --request POST \
--url https://api.aisa.one/apis/v1/unipile/hosted/link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"providers": [
"<string>"
],
"api_url": "<string>",
"expiresOn": "<string>"
}
'import requests
url = "https://api.aisa.one/apis/v1/unipile/hosted/link"
payload = {
"providers": ["<string>"],
"api_url": "<string>",
"expiresOn": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({providers: ['<string>'], api_url: '<string>', expiresOn: '<string>'})
};
fetch('https://api.aisa.one/apis/v1/unipile/hosted/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/unipile/hosted/link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'providers' => [
'<string>'
],
'api_url' => '<string>',
'expiresOn' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/unipile/hosted/link"
payload := strings.NewReader("{\n \"providers\": [\n \"<string>\"\n ],\n \"api_url\": \"<string>\",\n \"expiresOn\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/unipile/hosted/link")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"providers\": [\n \"<string>\"\n ],\n \"api_url\": \"<string>\",\n \"expiresOn\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/unipile/hosted/link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"providers\": [\n \"<string>\"\n ],\n \"api_url\": \"<string>\",\n \"expiresOn\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "HostedAuthUrl",
"url": "<string>"
}托管授权链接
创建托管授权链接,用于接入 LinkedIn 账号。
curl --request POST \
--url https://api.aisa.one/apis/v1/unipile/hosted/link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"providers": [
"<string>"
],
"api_url": "<string>",
"expiresOn": "<string>"
}
'import requests
url = "https://api.aisa.one/apis/v1/unipile/hosted/link"
payload = {
"providers": ["<string>"],
"api_url": "<string>",
"expiresOn": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({providers: ['<string>'], api_url: '<string>', expiresOn: '<string>'})
};
fetch('https://api.aisa.one/apis/v1/unipile/hosted/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/unipile/hosted/link",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'providers' => [
'<string>'
],
'api_url' => '<string>',
'expiresOn' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/unipile/hosted/link"
payload := strings.NewReader("{\n \"providers\": [\n \"<string>\"\n ],\n \"api_url\": \"<string>\",\n \"expiresOn\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/unipile/hosted/link")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"providers\": [\n \"<string>\"\n ],\n \"api_url\": \"<string>\",\n \"expiresOn\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/unipile/hosted/link")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"providers\": [\n \"<string>\"\n ],\n \"api_url\": \"<string>\",\n \"expiresOn\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "HostedAuthUrl",
"url": "<string>"
}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。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
create connects a new account, reconnect re-authenticates an existing one.
create, reconnect Provider list, for example ["LINKEDIN"]. Only used with type=create.
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.
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.
Label echoed back in events so you can match the account to your own user.
Callback notified once the connection completes.
Browser redirect after a successful connection.
Browser redirect after a failed connection.
Account id to re-authenticate. Required when type is reconnect.
Skip Unipile's hosted success screen before the browser follows success_redirect_url.
Provider features to disable on the connected account: linkedin_recruiter, linkedin_sales_navigator, or linkedin_organizations_mailboxes.