---
title: "获取小红书签名"
method: POST
path: "/api/v2/channels/rednote/open/offline-qr/share-config"
tags: ["渠道管理/内容发布"]
---

# 获取小红书签名

`POST /api/v2/channels/rednote/open/offline-qr/share-config`

## Request

- Base URL: `https://aitoearn.cn`
- URL: `https://aitoearn.cn/api/v2/channels/rednote/open/offline-qr/share-config`
- Auth: API key in header `X-Api-Key`
- TypeScript: <https://skmtc.dev/aitoearn/apis/aitoearn-api/docs/api/v2/channels/rednote/open/offline-qr/share-config/post.ts> (a function with typed inputs; its response is checked against the schema)

接口说明：获取前端调用小红书 `xhs.share` 所需的签名配置。API Key 属于接入方；扫码用户不需要 AiToEarn 账号，也无需提前授权或绑定小红书账号。

接入方需要提供自己的移动端分享页面，并将该页面地址生成线下二维码。扫码页面应请求接入方自己的后端，由接入方后端调用本接口，再将返回的 `verifyConfig` 交给前端调用 `xhs.share`。API Key 不得下发到前端。

本接口只生成 `verifyConfig`，不接收图片、视频、标题或正文，不创建 AiToEarn 发布记录，也不返回最终作品信息。分享内容由接入方前端调用 `xhs.share` 时传入。建议在用户准备分享时即时获取签名，并完整使用同一次响应中的 `nonce`、`timestamp` 和 `signature`，不要长期缓存、跨请求混用或跨多次分享复用。

`xhs.share` 的成功回调只表示 SDK 调用或 App 拉起成功，不能直接视为用户最终发布成功。单个 API Key 每 60 秒最多调用 60 次。

## Request body

- object
  - `nonce` string: 可选随机字符串，最长 64 个字符；不传时由服务端自动生成

## Response `200`

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

- object
  - `data` object
    - `verifyConfig` object, required: 调用小红书 xhs.share 时使用的校验配置
      - `appKey` string, required: 小红书应用 App Key
      - `nonce` string, required: 本次签名使用的随机字符串
      - `timestamp` string, required: 字符串形式的 Unix 毫秒时间戳
      - `signature` string, required: 前端调用 xhs.share 时使用的签名
  - `code` integer, required: 业务状态码。0 表示成功，非 0 表示业务错误。
  - `message` string, required: 响应消息。
  - `requestId` string: 请求 ID。
  - `timestamp` integer: 错误响应时间戳，Unix 毫秒。

## Changes

- **2026-11-03** `7cc8f21c4c96`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/aitoearn/apis/aitoearn-api/changes/api/v2/channels/rednote/open/offline-qr/share-config/post.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)
