# 转发消息

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /wxworkapi/message/exchange:
    post:
      summary: 转发消息
      deprecated: false
      description: >-
        :::highlight blue

        **转让群主**

        命令字：robot.message.forward

        ::: 




        ### 请求参数示例

        ```json

        {
            "messageId": "20241017193703173470846198",
            "type": "robot.message.forward",
            "robotKey": "2e308e7566684bd681722c80210c8084",
            "friends": [
                "7881303615907714",
                "1688853471030780"
            ],
            "msgSvrID": 1052800
        }

        ```


        ### 请求参数说明：

        | 名称       | 类型     | 必须 | 描述                                      |

        |------------|----------|------|-------------------------------------------|

        | type       | String   | 是   |
        `robot.message.forward`                             |

        | messageld  | String   | 是   | 请求消息id，32个字符的唯一，应答时原样回传 |

        | robotKey   | String   | 是   | 机器人robotKey                            |

        | msgSvrID   |  String  | 是   |   |

        | friends   |  Array  | 是   |  联系人userId，`示例：["7881303170011009", 
        "7881301008944969", "1688853470818708" ]` |





        ###  回调通知接口-发送结果通知数据示例


        > 回调通知接口  /XXXX/service/result



        ```json

        {
            "readCount": 0,
            "isWeAppShareMessage": 0,
            "isCommandMessage": 0,
            "sendTime": "2024-10-17 19:38:24",
            "isMakeAppointmentMessage": 0,
            "isAtAll": 0,
            "inCompoundMsg": 0,
            "cppContentType": 8,
            "isReceiptModeMsg": 0,
            "isWxDriveFileMessage": 0,
            "senderNickName": "",
            "isCodeMsg": 0,
            "wxNickName": "",
            "chatUser": "7881303615907714",
            "needConfirm": 0,
            "sendTimeTs": 1729165104,
            "hasQuoteMessage": 0,
            "isImageMessage": 0,
            "receiverName": "迷***",
            "code": "0",
            "normalUserName": "周***",
            "groupTag": 0,
            "msg": "OK",
            "anonymity": 0,
            "isReadUnreadMsg": 0,
            "realSenderName": "周***",
            "senderName": "",
            "isRevokeInReceiptMode": 0,
            "serviceTaskId": 1577,
            "topMessageId": 109,
            "friends": [
                "7881303615907714",
                "1688853471030780"
            ],
            "name": "",
            "revokeOriginalType": 0,
            "senderEnglishName": "",
            "isSelfInAtUserList": 0,
            "robotKey": "2e308e7566684bd681722c80210c8084",
            "unconfirmCount": 0,
            "cppIsControlMessage": 0,
            "senderId": 1688855175476092,
            "isNormalMessage": 1,
            "deviceInfo": 0,
            "isShouldMergeForwarding": 1,
            "validMsgId": 109,
            "isGeneralTextMsg": 0,
            "isFinanceMessage": 0,
            "decryptStatus": 0,
            "isUnSupportMsg": 0,
            "confirmCount": 0,
            "msgLocalID": 109,
            "isSendFromSelf": 1,
            "isSendFail": 1,
            "flag": 0,
            "receiverNickName": "",
            "dts": 1729165104153,
            "msgSeq": 0,
            "implementateSummary": 0,
            "isVoiceMessage": 0,
            "sharedHistoryMessageSendTime": 0,
            "followNameStamp": 0,
            "chat_user": "7881303615907714",
            "isControlMessage": 0,
            "clientId": "CAIQsO7DuAYY\/Oa+5pOAgAMgBA==",
            "isForwardableMessage": 1,
            "conversationName": "迷***",
            "isThirdPartyEncrypt": 0,
            "isInCompound": 0,
            "senderIdentify": 1,
            "isRead": 0,
            "indexInParentMsg": 0,
            "isPublicClock": 0,
            "sharedHistoryMessageAppinfo": "",
            "receiverHeadImg": "http:\/\/wx.qlogo.cn\/mmhead\/IbQhd2Y9oKfq2n78gE3dL8Hq7D0P3NPWbYZDIRkJ0EglRnIwHJxPdA\/0",
            "isGroupChat": 0,
            "type": "message.forward",
            "isWxFilleMessage": 0,
            "msgSvrID": 0,
            "isSendFromMac": 1,
            "isGroupConversationNoticeMessage": 0,
            "messageId": "20241017193703173470846198",
            "inviteType": 0,
            "robotType": 2,
            "contentType": 8,
            "conversationType": 1,
            "receiverId": "7881303615907714",
            "conversationId": "S:1688855175476092_7881303615907714",
            "isRevoke": 0,
            "isSharedHistoryMessage": 0
        }

        ```


        ### 字段说明
      tags:
        - 企微机器人/bot-发送消息
      parameters:
        - name: acttype
          in: query
          description: ''
          required: false
          example: forward
          schema:
            type: string
        - name: token
          in: header
          description: ''
          required: false
          example: '{{token}}'
          schema:
            type: string
        - name: request_id
          in: header
          description: ''
          required: false
          example: '{{request_id}}'
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  messageId:
                    type: string
                  type:
                    type: string
                  robotKey:
                    type: string
                  friends:
                    type: array
                    items:
                      type: string
                  msgSvrID:
                    type: integer
                required:
                  - messageId
                  - type
                  - robotKey
                  - friends
                  - msgSvrID
                x-apifox-orders:
                  - messageId
                  - type
                  - robotKey
                  - friends
                  - msgSvrID
              example:
                messageId: '20241017193703173470846198'
                type: robot.message.forward
                robotKey: 2e308e7566684bd681722c80210c8084
                friends:
                  - '7881303615907714'
                  - '1688853471030780'
                msgSvrID: 1052800
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: 企微机器人/bot-发送消息
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/6148098/apis/api-279498792-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://www.example.com
    description: 测试环境
security: []

```
