Skip to content

How to send file by Url#

To send file by Url, follow these steps:

1. Beginning of work#

  • Fill the Parameters sheet by the instruction
  • Go to the sendMessage sheet.

sendFileByUrl

2. Be sure to fill out the cells C, D, E, and F:#

Enter the client number in cell C. Use international format for telephone numbers without the prefix "+";

What are the features of sending and receiving messages to numbers of different countries?

Group chat Id

You can receive the Group Chat ID using various Green API methods. Don't create the Group Chat ID by yourself. It is generated by the system automatically and you can read more in methods GREEN-API.

  • Enter the type of chat in cell D. (personal / group).

    Warning! Use the next rules for writing: small case, without spaces and tabs on both sides.

  • Input file url in cell E.

    What file types does the API support?

    sendFileByUrl

  • In cell F input the file name and its extension.
How to send a file from your computer?

To upload the file from your computer, use the UploadFile method. In the "The path to the file" field, copy-paste the path to your file, then click on the button and get a link to the file.

Link lifetime is 15 days.
The maximum size of sent files is 100 MB. The file type affects determines the send method.

Optional field G - Caption

You can write a description following the next rules.

sendMessage
Example of filled cells

3. How to check WhatsApp account availability on a phone number#

To check WhatsApp account availability on a phone number set check on "Number check" in cell H.

The function only checks personal phone numbers and does not check the existence of groups.
For this reason, do not enable the checkbox when sending to groups or personal numbers and groups on the same sheet.

checkInCell

After sending the message you will receive one of status:
{"existsWhatsapp":false} or {"existsWhatsapp":true}:
- false - means that the number does not have a WhatsApp account or the number is incorrect;
- true - means that the WhatsApp account exists on this number.

4. Start mailing#

Scroll the sheet to the right. Click on the “Start mailing” button.

sendFileByUrl

5. Checking the status of sent messages#

The button «Message status» starts to check the status of sent messages. In cells I you see the next type of messages:
- not Sent - Your message has not been successfully dispatched to the WhatsApp server;
- Sent - Your message has been successfully dispatched to the WhatsApp server.
- Delivered - Your message has been successfully delivered to the recipient's device;
- Read - The recipient has read your message;

Read more about the statuses of messages in our article What are the statuses of messages in WhatsApp?

In cells J you see the status of messages:
- In send case: {"idMessage":"id your message"}
- In error case: Return error name

Important. To check status you need to enable notification in console. After applying the settings on the server, you need to wait approximately 5 minutes. You may not see the status "message read" cause the recipient disables this option in his WhatsApp.