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

# Get File Download Links

> 获取文件下载链接。在下载请求中填入一组文件 ID，API 会返回对应的下载链接。单个文件不超过 20MB。



## OpenAPI

````yaml /zh/account-center/v1.6/supporting.yaml post /v1/files/download_links
openapi: 3.0.2
info:
  version: 0.0.1
  x-source-en-commit: 8315da9
  x-source-en-path: account-center/v1.6/supporting.yaml
  title: Supporting Services
servers:
  - url: https://files.uqpaytech.com/api
    description: Sandbox 基础 URL。
  - url: https://files.uqpay.com/api
    description: 生产环境基础 URL。
security: []
tags:
  - name: File Service
paths:
  /v1/files/download_links:
    post:
      tags:
        - File Service
      summary: Get File Download Links
      description: 获取文件下载链接。在下载请求中填入一组文件 ID，API 会返回对应的下载链接。单个文件不超过 20MB。
      operationId: download-links
      parameters:
        - $ref: '#/components/parameters/XOnBehalfOf'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DownloadLinksRequest'
      responses:
        '200':
          description: OK——成功获取文件下载链接。
          headers:
            x-response-id:
              $ref: '#/components/headers/XResponseId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadLinksResponse'
                title: DownloadLinksResponse
      security:
        - XAuthToken: []
components:
  parameters:
    XOnBehalfOf:
      in: header
      name: x-on-behalf-of
      schema:
        type: string
      required: false
      description: >-
        设置为关联账户 ID 的值。更多信息参见
        [列出关联账户](/zh/account-center/v1.6/api-reference/list-connected-accounts)
      example: 18523f72-f4de-4f9c-bb8e-ec7d1c4f32be
  schemas:
    DownloadLinksRequest:
      type: object
      required:
        - file_ids
      properties:
        file_ids:
          type: array
          description: 要获取下载链接的文件 ID 列表。
          items:
            type: string
            format: uuid
            example: b3d9d2d5-4c12-4946-a09d-953e82sed2b0
          example:
            - b3d9d2d5-4c12-4946-a09d-953e82sed2b0
            - b3d9d2d5-4c12-4946-a09d-953e82sed2b1
            - b3d9d2d5-4c12-4946-a09d-953e82sed2b2
    DownloadLinksResponse:
      type: object
      properties:
        files:
          type: array
          description: 文件及其下载链接的列表。
          items:
            type: object
            required:
              - file_id
              - file_type
              - file_name
              - size
              - url
            properties:
              file_id:
                type: string
                format: uuid
                description: 文件的唯一标识符。
                example: b3d9d2d5-4c12-4946-a09d-953e82sed2b0
              file_type:
                type: string
                description: 文件扩展名类型（例如 `png`、`pdf`、`docx`）。
                example: png
              file_name:
                type: string
                description: 文件的原始名称（含扩展名）。
                example: example.png
              size:
                type: integer
                description: 文件大小，单位为字节。
                example: 123456
              url:
                type: string
                format: uri
                description: 该文件的临时下载 URL。
                example: >-
                  https://files.uqpaytech.com/api/v1/files/b3d9d2d5-4c12-4946-a09d-953e82sed2b0
        absent_files:
          type: array
          description: 已请求但未能找到的文件 ID 列表。
          items:
            type: string
            format: uuid
            example: b3d9d2d5-4c12-4946-a09d-953e82sed2b1
          example:
            - b3d9d2d5-4c12-4946-a09d-953e82sed2b1
            - b3d9d2d5-4c12-4946-a09d-953e82sed2b2
  headers:
    XResponseId:
      description: 响应的全局唯一标识符（UUID v4）。在与 UQPAY 支持团队沟通时，有助于定位某个请求。
      schema:
        type: string
        format: uuid
        example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
  securitySchemes:
    XAuthToken:
      type: apiKey
      in: header
      name: x-auth-token
      description: 用于请求 API 的 Token。

````