optns https://w1.nandbox.net/send-voice
Use this method to send a voice note. If you want nandbox clients to display the file as a playable voice message, your voice 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 note files of up to 50 MB in size, this limit may be changed in the future.
Field | Type | Required | Description |
---|---|---|---|
method | String | Yes | "sendVoice" |
chat_id | String | Yes | Unique identifier for the target chat or User_id |
size | String | Optional | Size of document |
voice | String | Yes | Voice note to send. Pass a file_id as String to send a voice note that exists on the nandbox servers . |
caption | String | Optional | "Voice note caption 0-256 characters |
disable_web_page_preview | Boolean | Optional | Disables link previews for links in this message |
disable_notification | Boolean | Optional | Sends the message silently. Users will receive a notification with no sound. |
reply_to_message_id | String | Optional | If the message is a reply, unique identification for the original (parent) message. |
reference | Long | Yes | Unique local identifier for the target chat/user |
to_user_id | String | Optional | if reply or send message to target user within a group chat or channel, unique identifier of the target user. |
echo | Integer | Optional | 1= repeat message 0= no echo |
menu_ref | String | Optional | Menu reference for existing predefined Menu. The menu will be displayed as inline menu associated to the message. |
inline_menu | Array of Menu | Optional | Inline menu object to hold menus.If both inline_menu and menu_ref are defined. Priority for inline_menu. |
chat_settings | Integer | Optional | 1= if you want to send to bot chat settings |