Create Douyin Check-in
Create a Douyin offline check-in publish entry. The API key belongs to the integration partner; the person scanning the QR code does not need an AiToEarn account and does not need to authorize or bind a Douyin account in advance.
Store recordId. You can display the server-generated userAction.qrCodeUrl directly or generate your own QR code from userAction.shortLink to customize its size, styling, or logo. Scanning the code opens the Douyin App, where the user confirms and completes publishing. schemeUrl can be used by a mobile page to attempt to open the Douyin App directly. The initial status is always 8, which means user action is required and does not indicate success.
After publishing completes, AiToEarn updates the publish record from the Douyin webhook. From the integration backend, use the same API key that created the record to call the existing GET /api/v2/channels/publish/records/{recordId} endpoint. The QR code and launch links expire; use expiresAt as the source of truth and create a new entry after expiration.
Images and video cannot be mixed. Up to 12 JPG, JPEG, PNG, or BMP images are supported, with a maximum size of 20 MB each. One MP4, AVI, MKV, or MOV video is supported, with a maximum size of 1 GB and a maximum duration of 3,600 seconds. Each API key can call this endpoint up to 30 times per 60 seconds.
curl --request POST \
--url https://aitoearn.cn/api/v2/channels/douyin/open/offline-qr \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data @- <<EOF
{
"content": {
"title": "Offline check-in",
"body": "Joining today's event #OfflineCheckIn",
"media": [
{
"url": "https://assets.example.com/check-in.mp4"
}
],
"cover": {
"url": "https://assets.example.com/check-in-cover.jpg"
}
}
}
EOF{
"code": 0,
"message": "Request succeeded",
"data": {
"recordId": "66c5f23ec7d9b89d23e6b102",
"status": 8,
"userAction": {
"shareId": "7400000000000000000",
"schemeUrl": "snssdk1128://openplatform/share?state=7400000000000000000",
"shortLink": "https://aitoearn.cn/api/shortLink/abc123",
"qrCodeUrl": "data:image/png;base64,iVBORw0KGgo...",
"expiresAt": "2026-08-22T13:00:00.000Z"
}
},
"requestId": "request_xxx"
}Authorizations
Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".
Body
Offline check-in publish content
Hide child attributes
Hide child attributes
Image or video list containing at least one media item. Up to 12 images or one video is supported, and images and video cannot be mixed.
1 - 12 elementsHide child attributes
Hide child attributes
Media URL
Title, up to 30 characters
30Body text. Hashtags can be included using #topic, with up to 5 topics. The title and body excluding topics can contain up to 1,000 characters in total.
Optional video cover using a publicly accessible image URL.
Hide child attributes
Hide child attributes
Cover URL
TikTok publishing options
Hide child attributes
Hide child attributes
Douyin short title, up to 12 characters
12Video cover timestamp in milliseconds
x >= 0Download permission: 1 allows downloads and 2 disallows downloads
1, 2 Visibility: 0 is public, 1 is private, and 2 is visible to friends
0, 1, 2 Douyin location POI ID
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
AiToEarn publish record ID
Publish status. The initial value is always 8, meaning that the user must continue in the Douyin App.
8 Information required for the user to complete publishing on Douyin
Hide child attributes
Hide child attributes
Douyin share ID
Scheme URL used to open the Douyin App
HTTPS launch short link that the integration can use to generate and customize its own QR code
Server-generated QR code PNG Data URL that can be used directly as an img src
Expiration time of the App launch links
Request ID.
Error response timestamp in Unix milliseconds.
curl --request POST \
--url https://aitoearn.cn/api/v2/channels/douyin/open/offline-qr \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data @- <<EOF
{
"content": {
"title": "Offline check-in",
"body": "Joining today's event #OfflineCheckIn",
"media": [
{
"url": "https://assets.example.com/check-in.mp4"
}
],
"cover": {
"url": "https://assets.example.com/check-in-cover.jpg"
}
}
}
EOF{
"code": 0,
"message": "Request succeeded",
"data": {
"recordId": "66c5f23ec7d9b89d23e6b102",
"status": 8,
"userAction": {
"shareId": "7400000000000000000",
"schemeUrl": "snssdk1128://openplatform/share?state=7400000000000000000",
"shortLink": "https://aitoearn.cn/api/shortLink/abc123",
"qrCodeUrl": "data:image/png;base64,iVBORw0KGgo...",
"expiresAt": "2026-08-22T13:00:00.000Z"
}
},
"requestId": "request_xxx"
}
