Skip to main content
Get the temporary download link for a file in a bot message.

API call description

  1. When a user sends an image, voice, video, file, or rich text message to the bot, obtain the temporary download code downloadCode from the information that the bot returns to the developer through the callback.
  2. Use the temporary download code downloadCode to call this API and obtain the temporary download link for the image, voice, file, or video in the message.
  3. Access the temporary download link to retrieve the file content.

Description

  • In a group chat: When a group member @s the bot, the bot does not support receiving voice, file, or video messages.
  • In a one-to-one chat between users: The bot does not support receiving voice, file, or video messages.
  • In a one-to-one chat between a user and a bot: The bot supports receiving voice, file, and video messages.

Request

Basic information

Request header

Request body

Request example

HTTP
Java
Python
PHP
Go
Node.js
C#

Response

Response body

Response body example

Error codes

If an error occurs when you call this API, look up the solution in the Global error codes document based on the error message.