Discord error 50123: The provided file type is invalid
Last verified against Discord Developer Docs - Opcodes and status codes
The provided file type is invalid.What error 50123 means
The file decoded fine, but its type is not one Discord accepts for the field you are uploading to. Different upload targets accept different formats: custom emoji, stickers, icons and banners each have their own list of supported image types, and a file that works as a message attachment may not be accepted in those fields.
Stickers are the strictest. They accept PNG, APNG, GIF and Lottie JSON, each with its own constraints, so converting a WebP or JPEG image straight into a sticker upload fails here. Animated assets uploaded to a field that only accepts static images can fail the same way.
Check what the specific endpoint documents rather than assuming the extension is enough. A file whose contents are corrupt rather than the wrong type returns 50110.
What it looks like
{
"message": "The provided file type is invalid.",
"code": 50123
}Why it happens
- Sticker uploaded as JPEG, WebP or another unsupported format
- File extension or MIME type does not match the real content
- Animated format used for a field that expects a static image
- Data URI declares a MIME type the endpoint does not accept
How to fix Discord error 50123
- 1Look up the accepted formats for the exact endpoint you are calling
- 2Convert the file to a supported format (for example PNG for stickers)
- 3Make the declared MIME type and file name match the actual content
- 4Retry the upload with the converted file
How to stop it recurring
Normalize user-supplied images into one known-good format per target before uploading, and record the target's accepted types next to your upload code. Sticker file size and dimension limits are on the Discord limits page. Reject unsupported formats at the point of user upload, with a clear message.
Official reference: Discord Developer Docs - Opcodes and status codes. See all Discord error codes or the Discord limits and quotas.
Related codes
Error 50123 - quick answers
What does Discord error 50123 mean?
The file decoded fine, but its type is not one Discord accepts for the field you are uploading to. Different upload targets accept different formats: custom emoji, stickers, icons and banners each have their own list of supported image types, and a file that works as a message attachment may not be accepted in those fields. Stickers are the strictest.
How do I fix Discord error 50123?
1. Look up the accepted formats for the exact endpoint you are calling 2. Convert the file to a supported format (for example PNG for stickers) 3. Make the declared MIME type and file name match the actual content 4. Retry the upload with the converted file
Should I retry after error 50123?
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.