渠道管理/授权
获取授权状态
接口说明:轮询平台授权 Session 状态。sessionId 必须使用发起平台授权成功响应中的 data.sessionId,不能自行生成或跨授权会话复用。
GET
/
api
/
v2
/
channels
/
accounts
/
auth
/
{platform}
/
status
/
{sessionId}
获取授权状态
curl --request GET \
--url https://aitoearn.cn/api/v2/channels/accounts/auth/{platform}/status/{sessionId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://aitoearn.cn/api/v2/channels/accounts/auth/{platform}/status/{sessionId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://aitoearn.cn/api/v2/channels/accounts/auth/{platform}/status/{sessionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/accounts/auth/{platform}/status/{sessionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"sessionId": "string",
"status": "string",
"requiresSelection": "boolean",
"expiresAt": "string"
},
"requestId": "string"
}授权
需要从 AiToEarn 获取 API Key。点击前往「API Key 获取教程」。
路径参数
授权平台。必须与发起授权时使用的 platform 一致。可选值:douyin、xhs、wxSph、KWAI、wxGzh、bilibili。
可用选项:
douyin, xhs, wxSph, KWAI, wxGzh, bilibili 示例:
"douyin"
发起平台授权接口成功响应中的 data.sessionId
示例:
"session-id-from-auth-start"
最后修改于 2026年9月29日
⌘I
获取授权状态
curl --request GET \
--url https://aitoearn.cn/api/v2/channels/accounts/auth/{platform}/status/{sessionId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://aitoearn.cn/api/v2/channels/accounts/auth/{platform}/status/{sessionId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://aitoearn.cn/api/v2/channels/accounts/auth/{platform}/status/{sessionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/v2/channels/accounts/auth/{platform}/status/{sessionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "请求成功",
"data": {
"sessionId": "string",
"status": "string",
"requiresSelection": "boolean",
"expiresAt": "string"
},
"requestId": "string"
}
