# 个微文件下载

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/qw/doApi:
    post:
      summary: 个微文件下载
      deprecated: true
      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;">下载地址为临时云资源，非官方CDN，7–15天不定期清理，请及时下载。</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;">/cloud/wxDownload</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>
                    fileAeskey:
                      type: string
                      title: 文件Aeskey
                      description: ''
                    fileAuthkey:
                      type: string
                      title: 文件Authkey
                      description: ''
                    fileSize:
                      type: integer
                      title: 文件大小
                      description: ''
                    fileType:
                      type: integer
                      description: >-
                        <p style="margin: 0; font-size: 14px; color: inherit;
                        line-height: 1.6;">1: 大图. 如果【接收图片消息】中的字段
                        image_has_hd=1,或者fileBigHttpUrl有值， 则可以使用这个type下载<br>2:
                        小图. 如果image_has_hd=0，或者fileMiddleHttpUrl有值,
                        则应该用这个type下载<br>3: 视频/图片缩略图，对应thumb这个字段<br>4: 视频<br>5:
                        文件/语音文件</p>
                      title: 文件类型
                    fileUrl:
                      type: string
                      title: 文件链接
                      description: ''
                    filename:
                      type: string
                      description: 需要加后后缀名  避免后缀丢失。
                    fileMd5:
                      type: string
                  required:
                    - guid
                    - fileAeskey
                    - fileAuthkey
                    - fileSize
                    - fileType
                    - fileUrl
                    - filename
                    - fileMd5
                  x-apifox-orders:
                    - guid
                    - fileAeskey
                    - fileAuthkey
                    - fileSize
                    - filename
                    - fileMd5
                    - fileType
                    - fileUrl
                  title: 请求参数
              required:
                - method
                - params
              x-apifox-orders:
                - method
                - params
            example:
              method: /cloud/wxDownload
              params:
                guid: '{{guid}}'
                fileAeskey: '34363162653037306165393365396666'
                fileAuthkey: >-
                  v1_828464aa315bb3e895ad3543302c864b3d0ca4ecea7b830d57150de6469936a266614254252f992eb08b718dac877aba81a1e9393cce830c47014b22ffae29d6
                fileMd5: ''
                filename: ''
                fileSize: 1399228
                fileType: 5
                fileUrl: >-
                  https://imunion.weixin.qq.com/cgi-bin/mmae-bin/tpdownloadmedia?param=v1_828464aa315bb3e895ad3543302c864b3d0ca4ecea7b830d57150de6469936a2101c601db89468269de2e56bacdb759018ddcdb87b4fda1a05b04cdf546e71dd4c19a450cf1a7fcf110d89688ec1059266c44df13fbbfd05521baf8497aff8818c4332cd72e9018230ef6ce717295633dff0a60161fb152c03ca9a73e3765fa07eb7d3fc3099cddc9d63ceae243353850be7b9a9ed1e443275becb0282fc2a2ca359df65a1ca06f806c8846b874c08f7f4dd2a7caa8d39a06a3961ab3a202aa804b9ba63fb656b996b44ef4920813cb2fa4b19df966ff49371912ed7dd666e5fefc9bc0f28fb833198f858ee2a0c47983f9317cf9621829c2002becbe280dfc0
      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:
                      cloudUrl:
                        type: string
                        title: 云链接
                        description: >-
                          <p style="margin: 0; font-size: 14px; color: inherit;
                          line-height: 1.6;">云端文件地址。</p>
                    required:
                      - cloudUrl
                    x-apifox-orders:
                      - cloudUrl
                    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:
                  cloudUrl: >-
                    https://wochat-media-dev.wochat-media-dev/wochat/buz**********281969888.amr
                msg: 成功
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: API参考/媒体与运营/文件与媒体（下载/上传）
      x-apifox-status: deprecated
      x-run-in-apifox: https://app.apifox.com/web/project/7051713/apis/api-410838558-run
components:
  schemas: {}
  securitySchemes:
    apiKey:
      type: apikey
      in: header
      name: X-WECOM-TOKEN
servers:
  - url: https://new.qiweapi.com/qiwe
    description: 正式环境
security: []

```
