Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message.

Log in to see full request history
timestatususer agent
Retrieving recent requests…
LoadingLoading…

Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .ogg file encoded with OPUS (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.

See sendVoice official docs for a list of supported parameters and other info.

Path Params
string
required

Your Bot Token

Body Params
string

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

string
Defaults to Required

Audio file to send. You can either pass a file_id as String to resend an audio that is already on the Telegram servers, or upload a new audio file by just passing the path to audio file as String and the SDK will take care of uploading the file for you.

int32
Defaults to null

Duration of the audio in seconds

boolean
Defaults to false

Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound. Other apps coming soon.

int32
Defaults to null

If the message is a reply, ID of the original message

Responses

Language
Request
Click Try It! to start a request and see the response here! Or choose an example:
application/json