Audio

Makes a bot send an audio message.

An audio file can be sent by using a URL or a file ID.

  • Using a URL: Only HTTPS is allowed, and originalContentUrl is required.
  • Using a file ID: The file ID returned when the content is uploaded is used to send messages.

Note

  • Whenever a file ID is used to send an audio message, the recipient's shared storage will be reduced by the size of the audio.

Request content {#audio-request}

ParameterTypeRequiredDescription
typestringYSet this parameter to "audio".
originalContentUrlstringNURL of the source file (HTTPS only).
Maximum length: 1,000 characters
Either originalContentUrl or fileId, but not both, must be specified (required).
fileIdstringNFile ID acquired when uploading content.
Either originalContentUrl or fileId, but not both, must be specified (required).

Request example {#audio-request-example}

URL {#audio-request-example-url}

{  "content": {    "type": "audio",    "originalContentUrl": "https://www.worksmobile.com/audio.mp3"  }}

fileId {#audio-request-example-fileid}

{  "content": {    "type": "audio",    "fileId": "jp1.1628695315008671000.1628781715.0.1000001.0.0.0"  }}