# 同步历史消息分页

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/qw/doApi:
    post:
      summary: 同步历史消息分页
      deprecated: true
      description: |
        <TipBad>
           # 本接口暂停使用  拉消息问题我们已处理，不需要继续调用此接口  
        </TipBad>
      tags:
        - 'API参考/会话与消息/消息模块 '
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
        - name: X-QIWEI-TOKEN
          in: header
          description: >-
            <p style="margin: 0; font-size: 14px; color: inherit; line-height:
            1.6;">进入 <a href="https://new.qiweapi.com/tokens" style="color:
            inherit; text-decoration: underline; font-weight: 600;">应用凭证</a>，复制
            <code style="color: inherit; background: rgba(82, 196, 26, 0.08);
            border: 1px solid rgba(82, 196, 26, 0.1); padding: 2px 4px;
            border-radius: 3px;">TokenId</code>。</p>
          required: true
          example: '{{tokenId}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  x-apifox-mock: /msg/syncMsg
                  title: 执行方法
                  description: >-
                    <code style="color: inherit; background: rgba(82, 196, 26,
                    0.08); border: 1px solid rgba(82, 196, 26, 0.1); padding:
                    2px 4px; border-radius: 3px;">/msg/syncMsg</code>
                params:
                  type: object
                  properties:
                    guid:
                      type: string
                      title: 设备 ID
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">设备唯一标识 <code style="color: inherit;
                        background: rgba(82, 196, 26, 0.08); border: 1px solid
                        rgba(82, 196, 26, 0.1); padding: 2px 4px; border-radius:
                        3px;">guid</code>，由「创建设备」接口返回，业务接口必传。</p>
                    msgSeq:
                      type: integer
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">分页使用，首次传0，下次传入返回值travelSyncKey</p>
                      title: 游标
                    limit:
                      type: integer
                      title: 每页数量
                      description: ''
                  required:
                    - guid
                    - msgSeq
                    - limit
                  x-apifox-orders:
                    - guid
                    - msgSeq
                    - limit
                  title: 请求参数
              required:
                - method
                - params
              x-apifox-orders:
                - method
                - params
            example:
              method: /msg/syncMsg
              params:
                guid: '{{guid}}'
                msgSeq: 922530
                limit: 10
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    title: 状态码
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">状态码，<code style="color: inherit;
                      background: rgba(82, 196, 26, 0.08); border: 1px solid
                      rgba(82, 196, 26, 0.1); padding: 2px 4px; border-radius:
                      3px;">0</code> 成功。</p>
                  data:
                    type: object
                    properties:
                      hasMore:
                        type: integer
                        description: |-
                          hasMore=0，无分页
                          hasMore=1，有分页
                        title: 是否有更多
                      syncMsgList:
                        type: array
                        items:
                          type: object
                          properties:
                            fromRoomId:
                              type: integer
                              title: 来源群Id
                              description: ''
                            isRoomNotice:
                              type: integer
                              title: 是否群公告
                              description: ''
                            msgData:
                              type: object
                              properties:
                                atList:
                                  type: 'null'
                                  title: At列表
                                  description: ''
                                content:
                                  type: string
                                  title: 消息内容
                                  description: ''
                              required:
                                - atList
                                - content
                              x-apifox-orders:
                                - atList
                                - content
                              title: 消息内容
                              description: ''
                            msgServerId:
                              type: integer
                              title: 消息id
                              description: ''
                            msgType:
                              type: integer
                              title: 消息类型
                              description: ''
                            msgUniqueIdentifier:
                              type: string
                              title: 消息唯一标识
                              description: ''
                            receiverId:
                              type: string
                              title: 接收者id
                              description: ''
                            senderId:
                              type: string
                              title: 消息发送人userId
                              description: ''
                            senderName:
                              type: string
                              title: 消息发送名称
                              description: ''
                            seq:
                              type: integer
                              title: 消息序号
                              description: ''
                            timestamp:
                              type: integer
                              title: 发送时间
                              description: ''
                          x-apifox-orders:
                            - fromRoomId
                            - isRoomNotice
                            - msgData
                            - msgServerId
                            - msgType
                            - msgUniqueIdentifier
                            - receiverId
                            - senderId
                            - senderName
                            - seq
                            - timestamp
                        title: Sync消息列表
                        description: ''
                      travelSyncKey:
                        type: integer
                        title: 同步 Key
                        description: ''
                    required:
                      - hasMore
                      - syncMsgList
                      - travelSyncKey
                    x-apifox-orders:
                      - hasMore
                      - syncMsgList
                      - travelSyncKey
                    title: 响应数据
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">业务数据。</p>
                  msg:
                    type: string
                    title: 说明
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">返回说明。</p>
                required:
                  - code
                  - data
                  - msg
                x-apifox-orders:
                  - code
                  - data
                  - msg
              example:
                code: 0
                data:
                  hasMore: 1
                  syncMsgList:
                    - fromRoomId: 1023
                      isRoomNotice: 0
                      msgData:
                        atList: null
                        content: ''
                      msgServerId: 101781
                      msgType: 0
                      msgUniqueIdentifier: >-
                        business|timer_remind_overdue_daily_bar|1970325054010_1708272000
                      receiverId: ''
                      senderId: ''
                      senderName: ''
                      seq: 9221964
                      timestamp: 1708324990
                  travelSyncKey: 922174
                msg: 成功
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 'API参考/会话与消息/消息模块 '
      x-apifox-status: obsolete
      x-run-in-apifox: https://app.apifox.com/web/project/7051713/apis/api-344613937-run
components:
  schemas: {}
  securitySchemes:
    apiKey:
      type: apikey
      in: header
      name: X-WECOM-TOKEN
servers:
  - url: https://new.qiweapi.com/qiwe
    description: 正式环境
security: []

```
