> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aitoearn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.



## OpenAPI

````yaml /openapi/en/aitoearn.openapi.json post /api/v2/channels/douyin/open/offline-qr
openapi: 3.0.1
info:
  title: AiToEarn Open Platform API
  description: >-
    AiToEarn Open Platform API. You can switch between the China and
    international sites for testing. Business success is determined by whether
    the response body has code === 0.
  version: 1.0.0
  contact: {}
servers:
  - url: https://aitoearn.cn
    description: China site
  - url: https://aitoearn.ai
    description: International site
security: []
tags:
  - name: AI Services
  - name: AI Services/Video Generation
  - name: AI Services/Image Generation
  - name: Channel Management
  - name: Channel Management/Accounts
  - name: Channel Management/Publishing
  - name: Channel Management/Platforms
  - name: Channel Management/Works
  - name: Channel Management/Account Groups
  - name: Channel Management/Authorization
  - name: Asset Management
  - name: AI Services/Large Language Models
paths:
  /api/v2/channels/douyin/open/offline-qr:
    post:
      tags:
        - Channel Management/Publishing
      summary: Create Douyin Check-in
      description: >-
        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.
      operationId: DouyinOpenOfflineQrController_createOpenPublish_v2
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: object
                  description: Offline check-in publish content
                  properties:
                    title:
                      type: string
                      description: Title, up to 30 characters
                      maxLength: 30
                    body:
                      type: string
                      description: >-
                        Body 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.
                    media:
                      type: array
                      default: []
                      description: >-
                        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.
                      items:
                        type: object
                        properties:
                          url:
                            type: string
                            format: uri
                            description: Media URL
                          options:
                            type: object
                            description: Media handling options
                            properties:
                              adaptation:
                                type: object
                                description: Media format conversion options
                                properties:
                                  imageFormat:
                                    description: Image and cover format conversion targets
                                    type: string
                                    enum:
                                      - 'off'
                                      - auto
                                      - jpeg
                                      - png
                                      - webp
                                additionalProperties: false
                            additionalProperties: false
                        required:
                          - url
                        additionalProperties: false
                      minItems: 1
                      maxItems: 12
                    cover:
                      type: object
                      properties:
                        url:
                          type: string
                          format: uri
                          description: Cover URL
                        options:
                          type: object
                          description: Media handling options
                          properties:
                            adaptation:
                              type: object
                              description: Media format conversion options
                              properties:
                                imageFormat:
                                  description: Image and cover format conversion targets
                                  type: string
                                  enum:
                                    - 'off'
                                    - auto
                                    - jpeg
                                    - png
                                    - webp
                              additionalProperties: false
                          additionalProperties: false
                      required:
                        - url
                      additionalProperties: false
                      description: >-
                        Optional video cover using a publicly accessible image
                        URL.
                  required:
                    - media
                  additionalProperties: false
                option:
                  type: object
                  description: TikTok publishing options
                  properties:
                    short_title:
                      type: string
                      maxLength: 12
                      description: Douyin short title, up to 12 characters
                    cover_tsp:
                      type: integer
                      minimum: 0
                      description: Video cover timestamp in milliseconds
                    download_type:
                      type: integer
                      enum:
                        - 1
                        - 2
                      description: >-
                        Download permission: 1 allows downloads and 2 disallows
                        downloads
                    private_status:
                      type: integer
                      enum:
                        - 0
                        - 1
                        - 2
                      description: >-
                        Visibility: 0 is public, 1 is private, and 2 is visible
                        to friends
                    poi_id:
                      type: string
                      description: Douyin location POI ID
                  additionalProperties: false
              required:
                - content
              additionalProperties: false
            examples:
              video:
                summary: Video check-in
                value:
                  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
                  option:
                    short_title: Event check-in
                    download_type: 1
                    private_status: 0
              images:
                summary: Image check-in
                value:
                  content:
                    title: Store check-in
                    body: 'Sharing today''s store visit #StoreVisit'
                    media:
                      - url: https://assets.example.com/check-in-1.jpg
                      - url: https://assets.example.com/check-in-2.jpg
                  option:
                    poi_id: poi_xxx
                    private_status: 0
      responses:
        '200':
          description: >-
            The request has been processed by the service. Business success is
            determined by whether the response body has code === 0.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      recordId:
                        type: string
                        description: AiToEarn publish record ID
                      status:
                        type: integer
                        enum:
                          - 8
                        description: >-
                          Publish status. The initial value is always 8, meaning
                          that the user must continue in the Douyin App.
                      userAction:
                        type: object
                        description: >-
                          Information required for the user to complete
                          publishing on Douyin
                        properties:
                          shareId:
                            type: string
                            description: Douyin share ID
                          schemeUrl:
                            type: string
                            description: Scheme URL used to open the Douyin App
                          shortLink:
                            type: string
                            description: >-
                              HTTPS launch short link that the integration can
                              use to generate and customize its own QR code
                          qrCodeUrl:
                            type: string
                            description: >-
                              Server-generated QR code PNG Data URL that can be
                              used directly as an img src
                          expiresAt:
                            type: string
                            format: date-time
                            description: Expiration time of the App launch links
                        required:
                          - shareId
                          - schemeUrl
                          - shortLink
                          - qrCodeUrl
                          - expiresAt
                        additionalProperties: false
                    required:
                      - recordId
                      - status
                      - userAction
                    additionalProperties: false
                  code:
                    type: integer
                    description: >-
                      Business status code. 0 means success; non-zero means a
                      business error.
                  message:
                    type: string
                    description: Response message.
                  requestId:
                    type: string
                    description: Request ID.
                  timestamp:
                    type: integer
                    description: Error response timestamp in Unix milliseconds.
                required:
                  - code
                  - message
              examples:
                success:
                  summary: Success
                  value:
                    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
      security:
        - apikey-header-X-Api-Key: []
components:
  securitySchemes:
    apikey-header-X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >-
        Need to get API Key from AiToEarn. Click to go to ["API Key Obtaining
        Tutorial"](/en/use/api-key).

````