---
title: "获取授权状态"
method: GET
path: "/api/v2/channels/accounts/auth/{platform}/status/{sessionId}"
tags: ["渠道管理/授权"]
---

# 获取授权状态

`GET /api/v2/channels/accounts/auth/{platform}/status/{sessionId}`

接口说明：轮询平台授权 Session 状态

## Path parameters

- `platform` string, required
- `sessionId` string, required

## Response `200`

请求已被服务处理。业务是否成功以响应体 code === 0 为准。

- object
  - `data` AuthSessionStatusVo
    - `sessionId` string, required — 授权 Session ID
    - `status` 'pending' | 'completed' | 'failed', required — 授权 Session 状态
    - `requiresSelection` boolean, required — 是否需要选择二级账号
    - `errorCode` number — 授权失败错误码
    - `expiresAt` string, date-time — 授权 Session 过期时间
    - `accountId` string — 首个本地账号 ID
    - `accountIds` string[] — 本地账号 ID 列表
    - `accounts` object[] — 已连接账号列表
      - `accountId` string, required — 本地账号 ID
      - `platform` 'douyin' | 'xhs' | 'wxSph' | 'KWAI' | 'youtube' | 'wxGzh' | 'bilibili' | 'twitter' | 'tiktok' | 'facebook' | 'instagram' | 'threads' | 'pinterest' | 'linkedin' | 'google_business', required — 平台类型
      - `platformUid` string, required — 平台账号 UID
      - `account` string — 平台账号补充唯一标识
      - `displayName` string, required — 平台账号展示名
      - `avatarUrl` string — 平台账号头像 URL
    - `selectableAccounts` object[] — 可选择的平台账号列表
      - `platform` 'douyin' | 'xhs' | 'wxSph' | 'KWAI' | 'youtube' | 'wxGzh' | 'bilibili' | 'twitter' | 'tiktok' | 'facebook' | 'instagram' | 'threads' | 'pinterest' | 'linkedin' | 'google_business', required — 平台类型
      - `platformUid` string, required — 平台账号 UID
      - `account` string — 平台账号补充唯一标识
      - `displayName` string, required — 平台账号展示名
      - `avatarUrl` string — 平台账号头像 URL
      - `parentPlatformUid` string — 父级平台账号 UID
  - `code` integer, required — 业务状态码。0 表示成功，非 0 表示业务错误。
  - `message` string, required — 响应消息。
  - `requestId` string — 请求 ID。
  - `timestamp` integer — 错误响应时间戳，Unix 毫秒。

---

[API](https://skmtc.net/aitoearn/apis/aitoearn-api.md) · [All operations](https://skmtc.net/aitoearn/apis/aitoearn-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aitoearn/aitoearn-api/versions/19d860d9260d/schema)
