Get Authorization Status
Interface description: Polling platform authorization session status
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": "Request succeeded",
"data": {
"sessionId": "string",
"status": "pending",
"requiresSelection": true,
"errorCode": 1,
"expiresAt": "2026-07-02T12:00:00.000Z",
"accountId": "string",
"accountIds": [
"string"
],
"accounts": [
{
"accountId": "string",
"platform": "douyin",
"platformUid": "string",
"displayName": "string",
"account": "string",
"avatarUrl": "string"
}
],
"selectableAccounts": [
{
"platform": "douyin",
"platformUid": "string",
"displayName": "string",
"account": "string",
"avatarUrl": "string",
"parentPlatformUid": "string"
}
]
}
}Authorizations
Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".
Response
The request has been processed by the service. Business success is determined by whether the response body has code === 0.
Business status code. 0 means success; non-zero means a business error.
Response message.
Hide child attributes
Hide child attributes
Authorization Session ID
Authorization Session Status
pending, completed, failed Do you need to choose a secondary account?
Authorization failure error code
Authorization session expiration time
First local account ID
Local account ID list
List of connected accounts
Hide child attributes
Hide child attributes
Local account ID
platform type
douyin, xhs, wxSph, KWAI, youtube, wxGzh, bilibili, twitter, tiktok, facebook, instagram, threads, pinterest, linkedin, google_business Platform account UID
Platform account display name
Platform account supplements unique identification
Platform account avatar URL
List of selectable platform accounts
Hide child attributes
Hide child attributes
platform type
douyin, xhs, wxSph, KWAI, youtube, wxGzh, bilibili, twitter, tiktok, facebook, instagram, threads, pinterest, linkedin, google_business Platform account UID
Platform account display name
Platform account supplements unique identification
Platform account avatar URL
Parent platform account UID
Request ID.
Error response timestamp in Unix milliseconds.
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": "Request succeeded",
"data": {
"sessionId": "string",
"status": "pending",
"requiresSelection": true,
"errorCode": 1,
"expiresAt": "2026-07-02T12:00:00.000Z",
"accountId": "string",
"accountIds": [
"string"
],
"accounts": [
{
"accountId": "string",
"platform": "douyin",
"platformUid": "string",
"displayName": "string",
"account": "string",
"avatarUrl": "string"
}
],
"selectableAccounts": [
{
"platform": "douyin",
"platformUid": "string",
"displayName": "string",
"account": "string",
"avatarUrl": "string",
"parentPlatformUid": "string"
}
]
}
}
