Troubleshooting File Sending Issues#
Contents#
- The iPhone video has a duration of 0:00 and won't play
- The image is displayed as a blank gray square
- Errors when sending specific file formats
The iPhone video has a duration of 0:00 and won't play#
Description:
The video sent via the API from the iPhone has a duration of 0:00 and won't play. However, when sent from an instance connected to Android, the video plays correctly.
Solution:
- Update to the latest version of WhatsApp.
- Update to the latest version of iOS.
- Clear the WhatsApp cache (all cached sends of this video).
- Resend the video - after completing the previous steps, everything should work correctly.
If the above steps don't help, make sure that your file format is supported by the API
The image is displayed as an empty gray square#
Description:
The image sent via the sendFileByUrl method from third-party storage is displayed as an empty gray square and is only a few kilobytes in size.
Solution:
Make sure you pass a link to the file download itself, to its content, and not to a website page.
If you use a link to a web page in the
sendFileByUrlmethod, the service will download the content from the HTML page, not from the file.
The correct method for sending files for some popular cloud storage services is described in the article: How to send a file to WhatsApp from cloud storage.
Errors sending specific file formats#
Description:
Errors sending media files of the following formats: FLAC, M4R, WAV, WEBP, AVIF, ICO, M4V.
Solution:
- Make sure you're using the correct MIME types for the files you're sending.
- When sending files of these formats via the API, you need to change the file extension in the request body to
MP4/MP3/PNGdepending on the file type (video/audio/media).