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

# 获取授权状态

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

## Request

- Base URL: `https://aitoearn.cn`
- URL: `https://aitoearn.cn/api/v2/channels/accounts/auth/{platform}/status/{sessionId}`
- Auth: API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/aitoearn/apis/aitoearn-api/docs/api/v2/channels/accounts/auth/:platform/status/:sessionId/get.ts> (a function with typed inputs; its response is checked against the schema)

接口说明：轮询平台授权 Session 状态。`sessionId` 必须使用[发起平台授权](/api-reference/get-api-v2-channels-accounts-auth-platform)成功响应中的 `data.sessionId`，不能自行生成或跨授权会话复用。

## Path parameters

- `platform` 'douyin' | 'xhs' | 'wxSph' | 'KWAI' | 'wxGzh' | 'bilibili', required
- `sessionId` string, required

## Response `200`

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

- object
  - `data` object
    - `sessionId` string
    - `status` string
    - `requiresSelection` boolean
    - `expiresAt` string
  - `code` integer, required: 业务状态码。0 表示成功，非 0 表示业务错误。
  - `message` string, required: 响应消息。
  - `requestId` string: 请求 ID。
  - `timestamp` integer: 错误响应时间戳，Unix 毫秒。

## Changes

- **2026-11-03** `7cc8f21c4c96`: 5 breaking, 5 warning, 9 info
  - the `path` request parameter `platform` was restricted to a list of enum values
  - the response property `data/requiresSelection` became optional for the status `200`
  - the response property `data/sessionId` became optional for the status `200`
  - the response property `data/status` became optional for the status `200`
  - …15 more

[Operation history](https://skmtc.dev/aitoearn/apis/aitoearn-api/changes/api/v2/channels/accounts/auth/:platform/status/:sessionId/get.md)

---

[API](https://skmtc.dev/aitoearn/apis/aitoearn-api.md) - [All operations](https://skmtc.dev/aitoearn/apis/aitoearn-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aitoearn/apis/aitoearn-api/revisions/7cc8f21c4c96?raw)
