Error code 131053 occurs when the WhatsApp API fails to upload a media file and you get the following error message, “Unable to upload the media used in the message.” This usually happens because the media file is in an unsupported format, has an issue, or doesn't comply with WhatsApp's media guidelines.

Here’s a simple, step-by-step guide to understanding and resolving this error.

Why Does Error 131053 Occur?

The error can happen due to:

  1. Unsupported media type or format.

  2. Corrupted or invalid media file.

  3. Large file size exceeding WhatsApp’s limits.

  4. Incorrect API configuration for handling media uploads.

Steps to Resolve Error 131053

1. Inspect the Error Details

Look at the error.error_data.details value in the webhook triggered by the failed message. This will give you more information about why the upload failed.

2. Use Command Line to Check MIME Type

If you’re unsure about the file type, use the command line to inspect the file’s MIME type:

On Unix or macOS use code: 

file -I rejected-file.mov

On Windows use code: 

Get-Content rejected-file.mov -Raw | Format-Hex

If it doesn’t work, use third-party tools to figure out the file type.

3. Verify the Media File

Check if the file meets WhatsApp's supported media requirements. Confirm the file type (e.g., JPG, MP4, PDF) and ensure the file size is within the limit as specified in WhatsApp Supported Media Types.

4. Test the File

Verify that the media file opens and works correctly on your system. If the file is unsupported or corrupted, re-save it in a supported format using a reliable tool.

5. Retry the Upload

Once the file is confirmed to be valid, use the WhatsApp API to re-upload the media file. Ensure the API call is structured correctly, with the appropriate parameters.

For more troubleshooting tips related to WhatsApp Business API check out our other blogs on heltar.com/blogs.