Discord error 50160: Voice messages must have a single audio attachment
Last verified against Discord Developer Docs - Opcodes and status codes
Voice messages must have a single audio attachment.What error 50160 means
A voice message must contain exactly one attachment, and it must be audio. Your request set the IS_VOICE_MESSAGE flag but attached zero files, more than one file, or a file that is not audio.
Common mistakes are setting the flag on a message that references an audio URL instead of uploading the file, attaching both the audio and a cover image, or uploading a file with an audio extension but the wrong content type. The attachment is sent as part of a multipart/form-data request like any other file upload.
Once the single audio attachment is present, Discord also expects metadata for it; missing duration or waveform fields return 50161. Adding text or embeds to the same message returns 50159.
What it looks like
{
"message": "Voice messages must have a single audio attachment.",
"code": 50160
}Why it happens
- No file uploaded, only a link to audio
- More than one attachment in the voice message
- Attachment is not an audio file
- Attachment array and uploaded files out of sync in the multipart request
How to fix Discord error 50160
- 1Upload exactly one audio file in the multipart request
- 2Make the attachments array contain one entry whose id matches the uploaded file
- 3Check the file's content type is audio
- 4Retry with the flag set and confirm the voice message renders
- 5Log the multipart field names your request contains (files[0], payload_json) to confirm there is only one file part
How to stop it recurring
Generate voice messages from a fixed template: one audio file, one attachment entry, the flag, and the metadata fields. Unit-test the multipart body your library produces, since attachment indexing is where most mistakes happen. Upload size limits are on the Discord limits page.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
- 50161: Voice messages must have supporting metadataVoice messages must have supporting metadata.
- 50159: Voice messages do not support additional contentVoice messages do not support additional content.
- 50173: Cannot send voice messages in this channelYou cannot send voice messages in this channel.
- 50045: File uploaded exceeds the maximum sizeFile uploaded exceeds the maximum size
Error 50160 - quick answers
What does Discord error 50160 mean?
A voice message must contain exactly one attachment, and it must be audio. Your request set the IS_VOICE_MESSAGE flag but attached zero files, more than one file, or a file that is not audio. Common mistakes are setting the flag on a message that references an audio URL instead of uploading the file, attaching both the audio and a cover image, or uploading a file with an audio extension but the wrong content type.
How do I fix Discord error 50160?
1. Upload exactly one audio file in the multipart request 2. Make the attachments array contain one entry whose id matches the uploaded file 3. Check the file's content type is audio 4. Retry with the flag set and confirm the voice message renders 5. Log the multipart field names your request contains (files[0], payload_json) to confirm there is only one file part
Should I retry after error 50160?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Discord by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.