Help Desk
  • Getting Started
    • πŸ™ŒWelcome to Whapi.Cloud
    • πŸ’°Pricing
    • β˜•Partners
    • πŸš€Getting started
    • πŸ‘¨β€πŸ’»API Docs
      • Developer hubs
      • Swagger environment
      • Postman collection
  • Sending
    • Introduction
    • Send text message
      • Whatsapp API send message PHP
      • Whatsapp API send message Python
      • Whatsapp API send message Node JS
      • Whatsapp API send message Π‘#
      • Whatsapp API send message Java
      • API integration with VB6
      • Whatsapp API send message GO (Golang)
    • Send video, audio, image, document
    • Send Group message
    • Send post to WhatsApp Channel
    • Send message with Buttons
    • Send Emoji
    • Overview of other methods for sending
      • Send Voice message
      • Send contact (vCard)
      • Send message reactions
  • Receiving
    • Introduction
    • Webhooks
      • Our webhooks (Tracked events)
      • Where to Find the Webhook URL?
      • Set the webhook link to the channel
      • Detailed webhook settings
      • How to check the webhook?
      • Incoming webhooks format
        • Incoming message
        • Sent message
        • Chats
        • Groups
        • Account and device status
        • Other
          • Presences
          • Views of stories (statuses)
          • Story (status) from your contacts
          • Calls
      • Receive messages
        • Receive WhatsApp messages using PHP
        • Receive WhatsApp messages using Node js
        • Receive WhatsApp messages using Python
    • HTTP API
      • Retrieve a Specific User's Chat History
      • Get a full-size picture in the response
      • Get order items
      • Get a profile picture of a chat or user
    • File expiration period
  • Groups
    • Send Group message
      • Mentioning all participants in a WhatsApp group
    • Get list of group members
    • Add new member to Group
  • Channels
    • Send post to WhatsApp Channel
    • Get messages from Channels
    • Get votes from polls in the Channel
  • Communities
    • Introduction
    • Create a community
    • Add a member to a community
    • Send announcement
    • Get info on community participants
    • Add a group / Exclude a group from the community
  • Account
    • Setting "Auto Download"
    • Customizable Webhook Headers
    • How to find out the IP channel
    • How to Delete a Channel
    • Add Business Info to Invoice
  • Source code
    • WhatsApp ChatBot
      • WhatsApp Python Bot
      • WhatsApp PHP Bot
      • WhatsApp Node JS Bot
      • WhatsApp Java Bot
    • WhatsApp API Google Sheets
    • WhatsApp Phone Number Checker
    • Request Distributor (Balancer)
  • FAQ
    • Chat ID. What is it and how to get it?
    • Current status of Buttons on WhatsApp
    • How to send a paragraph (line break)
    • Inactive Links in WhatsApp Messages
    • WhatsApp Text Formatting
    • Checking if the number has Whatsapp
    • Specifics of sending messages to numbers of different countries
    • Why aren't participants being added to the group?
  • Does WhatsApp API Work with the Phone Turned Off?
  • Hints
    • Android Emulators
    • Virtual Numbers for WhatsApp
    • How to use polls as buttons?
    • How to check who blocked you in Whatsapp?
    • Setting up a WhatsApp proxy
  • Integrations
    • Make.com
      • Ready-Made Scenarios
        • WhatsApp & Whisper API: Voice-to-Text Integration
        • Automated WhatsApp Group Message Forwarding in Make.com
      • Request Scenario Setup
    • Pabbly Connect
    • Google Contacts
    • DialogFlow
    • n8n
  • Tools
    • WhatsApp Number Checker
    • Automatic warm-up module
    • WhatsApp Activity Safety Meter
    • Residential Proxies from Whapi.Cloud
  • Troubleshooting
    • Couldn't Link Device – WhatsApp QR Code or Pairing Code Fails
    • Channel status β€œSYNC_ERROR”
    • Not getting a READ status on webhook
    • 429 (Too Many Requests) - Soft Ban
    • β€œWaiting for this message. This may take a while” – WhatsApp Message Error
    • Missing push notifications after connecting to API
  • Blocking
    • How to not get Banned?
    • How to do mailings without the risk of being blocked?
    • If My Number Is Banned, Can It Be Restored?
    • Unlocking Your WhatsApp Number
    • Connecting a New WhatsApp Number After a Ban: Steps and Recommendations
    • Warming Up New Phone Numbers for WhatsApp API
  • Partner Documentation
    • Introduction
    • Partner Dashboard Overview
    • Partner Program Guidelines
      • Workflow: Step-by-Step
      • Billing for Partners
      • Allocating Days to Customer Channels: Best Practices & Guide
      • Interface for channel management
    • Partner Documentation
      • Channel creation
      • Changing channel mode
      • Channel extension
      • Channel deletion
      • Getting the list of channels
      • Notices of end of days on balance
Powered by GitBook
On this page
  • Sending Media by link
  • Sending Media via Base64
  • Sending Media by Media ID (Uploading file to our cloud)
  • A single method for any media
  • Send Image (via URL / Base64 / upload to cloud)
  • Send Document (via URL / Base64 / upload to cloud)
  • Send Audio (via URL / Base64 / upload to cloud)
  • Send Voice
  • Send Video (via URL / Base64 / upload to cloud)

Was this helpful?

  1. Sending

Send video, audio, image, document

Endpoint for easy send media-file as message

PreviousWhatsapp API send message GO (Golang)NextSend Group message

Last updated 10 months ago

Was this helpful?

You can work with different types of files and it makes no difference what extension the document has. WhatsApp limits the sizes of files and its politics constantly changes and because of that we always recommend that you verify directly on WhatsApp’s website. In this you can find everything that you need to know about formatting and file sizing.

Your file needs to be specified in the mandatory "media" parameter and there are four options here: UPLOAD FROM FILE, UPLOAD FROM URL, UPLOAD FROM BASE64 and send the file by its media id.

If you store the file locally, you will need to either upload it to the server or send it in Base64 format.

Sending Media by link

If you have a direct link to an image that is posted somewhere on the internet. It is important that it is the file that is accessible via the direct link.

Request Body

{
  "to": "14045648921",
  "media": "https://filesamples.com/samples/image/jpeg/sample_640%C3%97426.jpeg"
}

Sending Media via Base64

In which case you will need to have a method in your application to convert the image to Base64. To make sure the conversion is successful, copy the generated base64 and paste it into your browser's address bar, if it is a valid image the browser will be able to display it, if the browser can't, check your method :)

IMPORTANT if you opt for a base64 before binary you will need to add the following expression data:image/png;base64, * your base64 code *

You can also manually recode the file and specify the result in your application. To do this, you can use our handy tool to encode any file into Base64 format:

Sending Media by Media ID (Uploading file to our cloud)

Via MediaID, in this case after automatically uploading the file to the cloud, you will get a media ID that you can use in the future.

A single method for any media

The method is intended for sending a file uploaded through a form (form-data):

Send Image (via URL / Base64 / upload to cloud)

Send Document (via URL / Base64 / upload to cloud)

Send Audio (via URL / Base64 / upload to cloud)

Send Voice

Send Video (via URL / Base64 / upload to cloud)

You can Send a ppt audio recording to the phone number or group, But WhatsApp is sensitive to this extension, you need to be in OGG format and the codecs should be the opus. Our API has an automatic video and audio converter for the necessary codecs compatible with WhatsApp. For more information, you can check out this .

link
https://panel.whapi.cloud/tools/base64-encode
article
πŸ“Ž Send media messageWhapi Cloud - Whatsapp API for developers
A single method for sending any media file
πŸ–Ό Send media-image messageWhapi Cloud - Whatsapp API for developers
πŸ“‘ Send media-document messageWhapi Cloud - Whatsapp API for developers
🎡 Send media-audio messageWhapi Cloud - Whatsapp API for developers
Logo
Logo
🎀 Send media-voice messageWhapi Cloud - Whatsapp API for developers
Logo
Logo
πŸŽ₯ Send media-video messageWhapi Cloud - Whatsapp API for developers
Logo
Logo