# 群成员变动查询

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/qw/doApi:
    post:
      summary: 群成员变动查询
      deprecated: false
      description: >-
        <div style="background: linear-gradient(135deg, rgba(255, 213, 145,
        0.45) 0%, rgba(255, 255, 255, 0.06) 100%); border: 1px solid rgba(255,
        236, 202, 0.7); border-radius: 12px; padding: 20px 28px; margin-bottom:
        20px; box-shadow: 0 4px 12px rgba(250, 140, 22, 0.08)">
          <h3 style="margin: 0 0 8px 0; font-size: 18px; font-weight: 600; color: inherit; border: none; padding-bottom: 0;">群成员变动查询</h3>
          <p style="margin: 0; font-size: 14px; color: inherit; line-height: 1.6">•用于解决群成员数量较多时，添加、删除成员同步成本高、工作量大的问题。</p>
        </div>
      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
                  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;">/room/getRoomIncrSync</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>
                    roomId:
                      type: string
                      title: 群id
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">群聊 ID。</p>
                    ver:
                      type: string
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">首次查询为空，查询指定偏移之后所有变动</p>
                      title: 偏移量
                    nowMemberCount:
                      type: string
                      title: 群成员数量
                      description: ''
                  x-apifox-orders:
                    - guid
                    - roomId
                    - ver
                    - nowMemberCount
                  required:
                    - guid
                    - roomId
                    - ver
                    - nowMemberCount
                  title: 请求参数
              x-apifox-orders:
                - method
                - params
              required:
                - method
                - params
            example:
              method: /room/getRoomIncrSync
              params:
                guid: '{{guid}}'
                roomId: 1079108**********
                ver: ''
                nowMemberCount: 500
      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:
                      roomList:
                        type: array
                        items:
                          type: object
                          properties:
                            memberList:
                              type: array
                              items:
                                type: object
                                properties:
                                  inviterId:
                                    type: integer
                                    title: 邀请人 ID
                                    description: ''
                                  isAdmin:
                                    type: integer
                                    title: 是否管理员
                                    description: ''
                                  isCreator:
                                    type: string
                                    title: 是否创建者
                                    description: ''
                                  joinTime:
                                    type: integer
                                    title: 加入时间
                                    description: ''
                                  joinScene:
                                    type: string
                                    title: 加入场景
                                    description: ''
                                  name:
                                    type: string
                                    description: >-
                                      <p style="margin: 0; font-size: 14px;
                                      color: inherit; line-height:
                                      1.6;">群成员设置的本群昵称，未设置时为空</p>
                                    title: 名称
                                  userId:
                                    type: string
                                    title: 群成员id
                                    description: >-
                                      <p style="margin: 0; font-size: 14px;
                                      color: inherit; line-height: 1.6;">用户
                                      ID。</p>
                                  roomRemarkName:
                                    type: string
                                    description: >-
                                      <p style="margin: 0; font-size: 14px;
                                      color: inherit; line-height:
                                      1.6;">群成员设置的本群备注(仅群成员自己可见)，未设置时为空</p>
                                    title: 群备注名称
                                  ' memberFlag':
                                    type: integer
                                    description: >-
                                      <p style="margin: 0; font-size: 14px;
                                      color: inherit; line-height: 1.6;">0正常
                                      1移除</p>
                                    title: 成员标志
                                x-apifox-orders:
                                  - inviterId
                                  - isAdmin
                                  - isCreator
                                  - joinTime
                                  - joinScene
                                  - name
                                  - userId
                                  - roomRemarkName
                                  - ' memberFlag'
                                required:
                                  - inviterId
                                  - isAdmin
                                  - isCreator
                                  - joinTime
                                  - joinScene
                                  - name
                                  - userId
                                  - roomRemarkName
                                  - ' memberFlag'
                              title: 群成员列表
                              description: ''
                            roomCreateTime:
                              type: string
                              title: 创建时间
                              description: ''
                            ' roomCreateUserId':
                              type: string
                              title: 创建人id
                              description: ''
                            roomExtType:
                              type: integer
                              title: 群Ext类型
                              description: ''
                            roomId:
                              type: string
                              title: 群id
                              description: ''
                            roomName:
                              type: string
                              title: 群名称
                              description: ''
                            roomAnnouncement:
                              type: string
                              title: 群公告
                              description: ''
                            roomAnnouncementSenderId:
                              type: integer
                              title: 群公告发送人ID
                              description: ''
                            roomAnnouncementTime:
                              type: string
                              title: 群公告时间
                              description: ''
                            roomIsForbidChangeName:
                              type: integer
                              title: 是否允许群成员修改群名
                              description: ''
                            roomEnableInviteConfirm:
                              type: integer
                              title: 是否开启群邀请确认
                              description: ''
                            roomDisableAddMember:
                              type: integer
                              title: 是否禁止群成员互相添加
                              description: ''
                            roomFlag:
                              type: integer
                              title: 群控制状态flag
                              description: ''
                            roomNewFlag:
                              type: integer
                              title: 群控制状态newFlag
                              description: ''
                            verdata:
                              type: string
                              title: Verdata
                              description: ''
                            ver:
                              type: integer
                              title: 偏移量
                              description: >-
                                <p style="margin: 0; font-size: 14px; color:
                                inherit; line-height: 1.6;">下次查询时送</p>
                          x-apifox-orders:
                            - memberList
                            - roomCreateTime
                            - ' roomCreateUserId'
                            - roomExtType
                            - roomId
                            - roomName
                            - roomAnnouncement
                            - roomAnnouncementSenderId
                            - roomAnnouncementTime
                            - roomIsForbidChangeName
                            - roomEnableInviteConfirm
                            - roomDisableAddMember
                            - roomFlag
                            - roomNewFlag
                            - verdata
                            - ver
                          required:
                            - memberList
                            - roomCreateTime
                            - ' roomCreateUserId'
                            - roomExtType
                            - roomId
                            - roomName
                            - roomAnnouncement
                            - roomAnnouncementSenderId
                            - roomAnnouncementTime
                            - roomIsForbidChangeName
                            - roomEnableInviteConfirm
                            - roomDisableAddMember
                            - roomFlag
                            - roomNewFlag
                            - verdata
                            - ver
                        title: 群列表
                        description: ''
                      msg:
                        type: string
                        title: 说明
                        description: >-
                          <p style="margin: 0; font-size: 14px; color: inherit;
                          line-height: 1.6;">返回说明。</p>
                    x-apifox-orders:
                      - roomList
                      - msg
                    required:
                      - roomList
                      - msg
                    title: 响应数据
                    description: >-
                      <p style="margin: 0; font-size: 14px; color: inherit;
                      line-height: 1.6;">业务数据。</p>
                x-apifox-orders:
                  - code
                  - data
                required:
                  - code
                  - data
              example:
                code: 200
                data:
                  roomList:
                    - memberList:
                        - inviterId: 16888523234234
                          isAdmin: 0
                          joinTime: 1708931411
                          name: 本群昵称1
                          userId: 168885**********1
                          roomRemarkName: '1111'
                          memberFlag: 1
                        - inviterId: 168885223423423
                          isAdmin: 0
                          joinTime: 1708931411
                          name: 本群昵称2
                          userId: 168885**********
                          roomRemarkName: '2222'
                          memberFlag: 0
                      roomCreateTime: '1708931411'
                      roomCreateUserId: 168885**********1
                      roomExtType: 2
                      roomId: 10791082**********1
                      roomName: dGVzdDAyMjbmtYvor5XnvqQ=
                      roomAnnouncement: ''
                      roomIsForbidChangeName: 1
                      roomEnableInviteConfirm: 0
                      roomDisableAddMember: 1
                      roomFlag: 0
                      roomNewFlag: 0
                msg: 成功
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: API参考/客户管理/群模块
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/7051713/apis/api-344613885-run
components:
  schemas: {}
  securitySchemes:
    apiKey:
      type: apikey
      in: header
      name: X-WECOM-TOKEN
servers:
  - url: https://new.qiweapi.com/qiwe
    description: 正式环境
security: []

```
