Sending all types of files to WhatsApp via the Chat API

We will tell you how you can send text, video, audio messages, send files, as well as electronic business cards, links and much more to WhatsApp via the Chat API.

1-Sending text messages

To send text messages, use the \SendMessage function.

Sometimes some of the messages may be lost when sending. In this case, pay attention to the quality of the Internet connection. Such situations may be associated with a loss of connection to the network.

2-Sending Files

To send files, you can use the \sendFile function.

You can send it as a link by converting the file to base64 using our converter, and you can also download and upload the file in the form field.

Sending a video

To send files, use only the https://link
You are given 10 seconds to upload a file to the server, if during this time the file did not have time to download, it will not be sent or an error will occur. The maximum file size is 60 MB.

It is better to send large files with a link, and not in base64.

Video reception

You can enable the video reception function in your personal account in the "Account Settings" section.

It is also possible to enable video reception through the documentation. Use the group of methods : /settings.
and a request in JSON:"videoUploadOn":true

3-Sending audio messages

To send audio messages, you need to use the /sendPTT function.



At the same time, please note that WhatsApp accepts audio messages only in the format .ogg with the Oris codec

There is a very effective way to send voice messages:

1-Send a voice message to WhatsApp.
2-Download it from the link from /messages.
3-Send the received file.

4-Sending Hyperlinks

To send links, you should use the \sendLink function



At the same time, when sending links to users with whom you communicate for the first time, the links may be blocked by WhatsApp anti-spam mechanisms. In order for the links to become active again, the user must add your contact to the notebook and continue communicating with you.

You can get acquainted with the functions of sending electronic business cards, geolocation, and forwarding messages in our documentation.

Was this article helpful?

Your opinion will be used to improve the content of the article

The Most Multifunctional WhatsApp API Provider

Chat API has been operating since 2015 and is one of the first and largest providers in Eastern Europe.

Here are some curious and important figures:

  • We have tremendous expertise in docker container management at scale with an SLA of 99.5+%;
  • Chat API involves in its work more than 200 servers, with the ability to quickly connect another 100;
  • 3200 cores and 25 terabytes of RAM;
  • 200+ WhatsApp methods and features that keep adding;
  • Highload system, Up Time servers 99.9%;
  • Support 24\7;
Get access to the WhatsApp API