Skip to main content
The offline check-in APIs are called by an integration partner that owns an API key. The person scanning the QR code does not need an AiToEarn account and does not need to bind a Douyin or REDnote account in advance.

Participants

Douyin flow

1

Create a publish entry

Call POST /api/v2/channels/douyin/open/offline-qr from the integration backend with X-Api-Key.
2

Display the QR code

Store recordId. Either display userAction.qrCodeUrl directly or generate your own QR code from userAction.shortLink. Never expose the API key to the frontend.
3

Let the user publish

The user scans the QR code on a phone. The short link opens Douyin with the title, body, and media prefilled, and the user confirms publishing.
4

Query the result

Using the same API key that created the record, call the existing GET /api/v2/channels/publish/records/{recordId} endpoint from the integration backend.
The API supports two QR code display options:
  • qrCodeUrl: A server-generated PNG Data URL that can be used directly in an HTML <img> element.
  • shortLink: An HTTPS short link that the integration can encode into a custom QR code with its preferred size, colors, styling, or logo.
To display the generated QR code directly:
Both options ultimately encode shortLink. schemeUrl can be used by a mobile page to attempt to open the Douyin App directly. status: 8 means that user action is still required. It does not mean that publishing succeeded. After publishing completes, AiToEarn updates the publish record from the Douyin webhook. Query every 5–10 seconds and stop after expiresAt. Create a new entry after the link expires.

REDnote flow

The REDnote endpoint returns a signature for xhs.share. It does not create an AiToEarn publish record or return the final post result.
1

Prepare a mobile landing page

Provide your own mobile sharing page and encode that page URL as the offline QR code.
2

Request the signature

After the page opens, call POST /api/v2/channels/rednote/open/offline-qr/share-config from your backend. Keep the API key on the server.
3

Call xhs.share

Use the returned verifyConfig in the frontend call to xhs.share, together with the title, body, images, or video.
4

Let the user share

The user confirms publishing in the REDnote app. A frontend callback only indicates the xhs.share invocation or app-launch result and must not be treated as final publishing confirmation.

Backend proxy

The QR landing page must not call AiToEarn with the API key directly. It should call the integration backend, which requests the signature from AiToEarn and returns verifyConfig to the page.
nonce is optional and can be generated by AiToEarn. If the integration supplies its own nonce, it must use the returned nonce, timestamp, and signature together and must not mix fields from different requests.

Use the signature on the landing page

After obtaining verifyConfig from the integration backend, pass it unchanged to REDnote xhs.share. The title, body, images, or video are not sent to the AiToEarn signature endpoint; pass them when calling xhs.share using the parameter format required by the REDnote SDK version used by the integration.
Request a signature when the user is ready to share. Do not cache it for a long time or reuse it across multiple sharing attempts. AiToEarn does not create a REDnote publish record, so there is no recordId and no publish-record polling step.
A successful xhs.share callback only confirms the SDK invocation or app launch. The user may still cancel instead of publishing in the REDnote app.
Douyin returns a ready-to-display QR code. REDnote returns a frontend sharing signature. These are different publishing protocols and require different integration flows.
Last modified on August 24, 2026