How to Send Media Files with WhatsApp Business API

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ค. 2024
  • Do you want to send images, documents, audio files or videos using the WhatsApp Business API? In this video I show you how to do it! You're going to learn how to do it using Postman, but also how do it using your favorite programming language such as PHP, Javascript, Python, Ruby, among others.
    ➡️ Try Wasapi for 7 days at no cost at» bit.ly/45mTqcb
    ➡️ NEW: If you want to send & receive WhatsApp messages EASILY, without all the technical knowledge required here, check out this NEW video: bit.ly/sendReceiveWasapi
    ➡️ If you want information about the course (From Zero to Expert in the WhatsApp API), CLICK HERE » bit.ly/cursoApiWhatsApp
    This is the fifth video of the video series in which we explore in detail the new Meta WhatsApp Business API to automate marketing operations, communicate with users and customers, among other things!
    If you want to watch the entire playlist follow this link: • WhatsApp Business API
    Links:
    - API Documentation: / cloud-api
    - Developer Account: developers.
    - Glitch: glitch.com/
    - Postman: www.postman.com/
    Chapters:
    0:00 Intro
    1:01 Sending images with the API
    8:26 Sending PDF documents with the API
    10:35 Sending audio and video with the API
    11:36 Generating code with Postman
    13:15 Using WhatsApp API with PHP
    14:50 Using Javascript and other languages
    15:17 Next Steps

ความคิดเห็น • 110

  • @VinixCode
    @VinixCode  ปีที่แล้ว +2

    ➡ NEW: If you want to send & receive WhatsApp messages EASILY, without all the technical knowledge required here, check out this NEW video: bit.ly/sendReceiveWasapi

  • @jeffsanaraujo
    @jeffsanaraujo ปีที่แล้ว

    Congrats buddy! You helped me a lot!

  • @hareeshm9714
    @hareeshm9714 ปีที่แล้ว

    congrats dude🤝It was very helpful for me a lot

    • @hareeshm9714
      @hareeshm9714 ปีที่แล้ว

      dude, do you know how to get list of values in whatsapp business API

  • @wellingtonalves5214
    @wellingtonalves5214 2 ปีที่แล้ว

    Nice, thank you

  • @Richard.0991
    @Richard.0991 ปีที่แล้ว +1

    For those who have the problem that can't send images and documents. What I did was send a message from the client side to the business account, then I was able to send images. Apparently to send multimedia content, the client must respond before (at least once).

  • @HTGGAMERYT
    @HTGGAMERYT 2 หลายเดือนก่อน

    Thank you I was searching for long just found your😂😅

  • @softmerit25
    @softmerit25 10 หลายเดือนก่อน +1

    Thanks a bunch. great work. I love to ask; How about how to send multiple images at once using the endpoint?

  • @vinaydanidhariya
    @vinaydanidhariya 11 หลายเดือนก่อน

    greate man !!!!

  • @lordVonDK
    @lordVonDK ปีที่แล้ว

    Man, u mentioned that is necessary that the recepient number write back in order to be allow from the API standpoint to send custom text, image, video and so on. Is there any documentation where that behaviour is explained?

  • @AbigorLuna
    @AbigorLuna ปีที่แล้ว +1

    como le hago si quiero adjuntar un archivo desde mi computadora local y no desde un link?

  • @galim5000
    @galim5000 ปีที่แล้ว +2

    hello! How can I generate media_id for an audio file? Thank you!☺

  • @saturdaynight92
    @saturdaynight92 8 หลายเดือนก่อน

    Thanks dude its very useful for me .
    Is there any possible way to send documents without recipient reply ?

  • @ombhamare522
    @ombhamare522 10 หลายเดือนก่อน

    Hey Juan or anyone reading this,
    I wanted to know how to get the picture in picture mode for a TH-cam video link sent in a message through WhatsApp API or even whether that is possible.
    This p-i-p does happen while sending messages through normal WhatsApp but not when u send it from a WhatsApp Business API.
    Hoping for some help!

  • @MrRazorswift
    @MrRazorswift 5 หลายเดือนก่อน

    Hi, is it a must to use the URL? What if I have a local audio filepath. How can I use the WhatsApp API to send the message to the user?

  • @sukasukakuye
    @sukasukakuye 2 ปีที่แล้ว

    amazing content, can you explain how to get (receive) reply message (whatsapp cloud api) and print to my webpage

  • @djaos-8326
    @djaos-8326 6 หลายเดือนก่อน

    No encontre en la docu de whatsapp la parte de subir archivos que no sean imagenes

  • @vanshikakejriwal6980
    @vanshikakejriwal6980 4 หลายเดือนก่อน +1

    @VinixCode how can i send pdf document as header of a template message?

  • @akhandsingh7657
    @akhandsingh7657 3 หลายเดือนก่อน

    Hello,
    while sending the document pdf file from aws s3 objectUrl to WhatsApp Meta API's. It converts the pdf file to encrypted binary file format automatically, but I want to send it normally in pdf file format, please provide a solution.
    Thank you!

  • @DesmondTio
    @DesmondTio ปีที่แล้ว

    do you know how to send TH-cam video url ended with mp4?

  • @maheshshende8432
    @maheshshende8432 20 วันที่ผ่านมา

    How to send and open view once media and voice messages using cloud API?

  • @sarthakjoshi3797
    @sarthakjoshi3797 ปีที่แล้ว +1

    how to send a video message -> you didn't cover it, struggling with finding the correct payload! Help !

  • @user-hg4mr6wl2w
    @user-hg4mr6wl2w 3 หลายเดือนก่อน

    Does WAB API support forwarding? Or can it be coded for it?

  • @pathu391
    @pathu391 2 ปีที่แล้ว

    hi your vedio is awesome..it is very useful for me thanks...how to start and build our own whatsapp chat bot.

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว

      This is something that we will be covering in future videos!

  • @krystianoziembaa1855
    @krystianoziembaa1855 10 หลายเดือนก่อน

    How to check whether the user has confirmed receiving messages ? I was thinking to send a welcome message first and then send the pdf file.

  • @sureshsah7711
    @sureshsah7711 2 ปีที่แล้ว +1

    Hii ...
    I'm unable to send the messages through WhatsApp API, it's says 'sending message failed', an unexpected error '

  • @liuzhiqiang8030
    @liuzhiqiang8030 ปีที่แล้ว +1

    Hi Great work. When I used postman to call the API, it throws:
    {
    "error": {
    "message": "(#100) Invalid parameter",
    "type": "OAuthException",
    "code": 100,
    "error_data": {
    "messaging_produc t": "whatsapp",
    "details": "Parameter Invalid"
    },
    "error_subcode": 2494010,
    "fbtrace_id": "AMpEzMHlMd-F2ll2NMiqZui"
    }
    }
    Could you help me fix the problem? Thanks

  • @killer34CR
    @killer34CR ปีที่แล้ว

    I would like to send 10 different message to 10 receipts, Can i send them in 1 single request API instead of 10 request API ?

  • @tiger7keyur
    @tiger7keyur ปีที่แล้ว

    Hey. It was very helpful video to me. Though there is one point for which I need more details. Can you please show how to create that Fb APP as well?

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      Hey Keyur, we have a video covering that topic! th-cam.com/video/ul_9qe_fiTY/w-d-xo.html

  • @neemiahluis6449
    @neemiahluis6449 2 ปีที่แล้ว

    Hi great work, one can easily follow... Have you made a tutorial on automatic responses based on replies from users? Previously I built a chatbot with twillio and python and I would just insert the webhook url in twillio settings and everything was going well. can the same be done with cloud api? I want to use the already done script as it links perfectly with the Postgres database.

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว +1

      Neemiah, it is indeed possible to build a chatbot with this new API! You can use a solution like Twilio or Dialogflow, or even write your write your own chatbot if you want to. For that, you do need to set up a webhook, as it will be the one that processes all the alerts and messages from WhatsApp.

    • @neemiahluis6449
      @neemiahluis6449 2 ปีที่แล้ว

      @@VinixCode Yes, I tried to reuse the code I used with Twilio and inserted the webhook but did not succeed, that is why I wondered if you made a tutorial on that, so I can see where I went wrong

  • @zahidusman1087
    @zahidusman1087 ปีที่แล้ว

    Note, you need to reply to template message or press Continue before you can receive next message, i.e image message.

  • @alialfaily7829
    @alialfaily7829 ปีที่แล้ว +1

    hello when i try to send pdf .i receive html file in WhatsApp can you help me

  • @flavienhello3827
    @flavienhello3827 ปีที่แล้ว

    Anyone knows how to read a voice note that we receive ?
    I can't find that anywhere

  • @danteariastarifa4297
    @danteariastarifa4297 2 ปีที่แล้ว

    Muy buenas quisiera que me ayudes con una duda, mencionabas en un video que WhatsApp te cobra por conversación, que pasa si yo empiezo la conversación con alguien por Whatsapp sin necesidad de usar la api. De igual manera contara como una conversación a cobrar?

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว

      Dante, y cómo iniciarías la conversación sin usar la API? Te pregunto, porque el número de teléfono que uses para la API, no puede ser usado en la aplicación móvil de WhatsApp y viceversa.

  • @zakariajawas
    @zakariajawas ปีที่แล้ว

    Great explanation, but i have a question what is the use of their "POST /PHONE_NUMBER_ID/media" end point if we can send file as urls?

    • @VinixCode
      @VinixCode  ปีที่แล้ว +2

      This endpoint is used to upload local files instead of using a URL.

    • @zakariajawas
      @zakariajawas ปีที่แล้ว

      @@VinixCode I asked because i saw media templates with urls only, but i just checked that they support sending medias with urls and ids as messages not templates. Thank you so much for your effort.

  • @williamluhanga
    @williamluhanga 11 หลายเดือนก่อน

    Trying to send a pdf i am receiving the file as null.bin any solution?

  • @daniloreiis
    @daniloreiis ปีที่แล้ว

    Hello my friend, this video helped me a lot, now I can send any document thanks to you, thank you, but I need to understand why it is only possible to receive the document via API only when the contact says hi first?

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      You mean send a document or receive a document? You can use template messages to send messages to anybody, but to send regular messages you first need to get a reply back from the user. That's essentially the way in which that person authorizes the reception of messages from you.

  • @akshsharma2015
    @akshsharma2015 ปีที่แล้ว

    Hi,
    I want to use WhatsApp cloud API in my laravel App and send the same message to multiple users. How can I set the 'Recipient-Phone-Number' number dynamically?

    • @VinixCode
      @VinixCode  ปีที่แล้ว +1

      Aksh, just store the names in a variable or retrieve the data from the database, and use a loop to send each message.

  • @vasanthchandrasekar5553
    @vasanthchandrasekar5553 ปีที่แล้ว

    Hi! how can i achieve this in php

  • @IRTPL
    @IRTPL 7 หลายเดือนก่อน

    How to send from Local File i.e. d:\ pdf file instead of Link

  • @mohamedkunle528
    @mohamedkunle528 2 ปีที่แล้ว

    thank you so much you helped me a lot , but can send a document first, like start the conversation with a document, if that is impossible can you make a template that can send a document to initiate the conversation

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว +1

      Mohamed, yes. You can simply create a message template that sends a document in the header and use that to initiate the conversation.

    • @mohamedkunle528
      @mohamedkunle528 2 ปีที่แล้ว

      @@VinixCode sorry to bother you , can you send like two documents in one template or let me say can you send multiply documents in one postman request or one template , i search it a lot still can’t find it please help me .

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว

      @@mohamedkunle528 No, you can't but you can send 2 messages with each file.

  • @killer34CR
    @killer34CR ปีที่แล้ว

    Hi, I would like to send a Video and Message Body content as single message without using template. Is it possible ?

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      It is possible to do this, but you cannot do it if you're starting a conversation. To initiate a conversation you always have to use a template.

  • @webdevpriyank
    @webdevpriyank 2 ปีที่แล้ว

    Hey bro thanks for great content. How to receive Messages for Business API and how can I fetch them. Please help

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว

      Priyank, that's exactly the next video that we'll be uploading this Monday. Stay tuned.

  • @EstebanMallea
    @EstebanMallea ปีที่แล้ว

    Tengo una consulta. Envio una imagen, la respuesta es 200 sin problema, pero la imagen nunca llega. Sigo al pie la petición. Cual puede ser el problema? Deberé activar algo mas de la app que no hago?. Los mensajes de texto plano son los únicos que llegan correctamente

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      Esteban, la respuesta 200 solo significa que la petición fue procesada exitosamente, no que el mensaje fue enviado. Para saber si el mensaje fue enviado o no, debes leer la información que te envían por los Webhooks. En este video explicamos todo este tema: th-cam.com/video/41_4Q5NApTw/w-d-xo.html

  • @tiassasongko113
    @tiassasongko113 2 ปีที่แล้ว

    hello, how can i sent documment on local (not using from external link) with WAB API?

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว

      Tias, using the Media API: developers.facebook.com/docs/whatsapp/cloud-api/reference/media
      1. Upload the file (POST /PHONE_NUMBER_ID/media)
      2. Send the message and pass the media ID in the payload.

  • @Siddharth2155
    @Siddharth2155 11 หลายเดือนก่อน

    Hey, is there a way to send caption along with the image. This is a reply to a message, and thus not using a template

    • @VinixCode
      @VinixCode  11 หลายเดือนก่อน

      Yes. You can pass the 'caption' attribute in the payload, along with the 'link' attribute.

  • @leonardshayo7903
    @leonardshayo7903 11 หลายเดือนก่อน

    Is it possible at the first time of starting conversation to send a media file?

    • @VinixCode
      @VinixCode  11 หลายเดือนก่อน

      Yes. If you use a message template with a media file in the header.

  • @amjadarnaout7019
    @amjadarnaout7019 ปีที่แล้ว

    Thank you for your Video
    I try To send massages text it's done
    but when i change the code to send File not working
    the result show me ok but i didn't receive
    Should I make a real account and not a demo but the text i received only photo or document
    please help me

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      You need to use WhatsApp's webhooks to know whether your message was delivered or not. We cover all of that in this video: th-cam.com/video/UvE5G2oTjdM/w-d-xo.html

  • @dariomagana8035
    @dariomagana8035 ปีที่แล้ว

    Hello!
    Do you know why I get the correct 200 response but I don't receive the image? I've already chatted with this user before and I'm still using the test number provided by whatsapp

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      We covered that topic in this video: th-cam.com/video/UvE5G2oTjdM/w-d-xo.html
      Basically a 200 response doesn't mean that the message was sent. It only means that WhatsApp received your request, but they then notify you via webhooks whether the messages was delivered or not.

  • @sanjayrajhb5992
    @sanjayrajhb5992 ปีที่แล้ว

    hey Juan, can I send a pdf document to a customer via our WhatsApp business directly without sending a welcome text message at first or even if I did send a welcome text message and the customer not replying to it with anything? I mean is it possible?

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      Yes. Just create a message template that uses a document as a header, and send that one instead of the hello world template.

    • @sanjayrajhb5992
      @sanjayrajhb5992 ปีที่แล้ว

      @@VinixCode thanks Juan👍

  • @jesusboneth7955
    @jesusboneth7955 10 หลายเดือนก่อน

    el acento haciendo de las suyas 😅

  • @priyav8880
    @priyav8880 ปีที่แล้ว

    How to get media id???

  • @nickyn286
    @nickyn286 11 หลายเดือนก่อน

    nice tip there the user has to text me first...thanks

    • @VinixCode
      @VinixCode  11 หลายเดือนก่อน

      Unless you start the conversation using a message template.

  • @jagadishhudgi1108
    @jagadishhudgi1108 ปีที่แล้ว

    Delicious, can also show me how to send image to whatsapp using HTML

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      Hey Jagadish, not sure what you mean by sending an email using HTML...

    • @jagadishhudgi1108
      @jagadishhudgi1108 ปีที่แล้ว

      @@VinixCode so far you hav sent only text message from html to whatsapp , but I want to send image as well

  • @burloiumarian2665
    @burloiumarian2665 ปีที่แล้ว

    I cannot send localhost pdf to whatsapp ... the file needs to be hosted on a real server , right?

    • @VinixCode
      @VinixCode  ปีที่แล้ว +1

      That’s right, you need to use a real server or a tunnel such as ngrok.

  • @gajendrasingh5656
    @gajendrasingh5656 2 ปีที่แล้ว

    Can I send an attachment from google drive, not a link original file like pdf or image

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว +1

      Gajendra, that should work but only if it's a public link. Give it a try.

    • @yogendrayogesh3307
      @yogendrayogesh3307 ปีที่แล้ว

      @@VinixCode I changed the drive file sharing setting as "Anyone with link", but it didn't work. Also google drive have removed the option to share with 'Anyone on web'. I've a hunch that only indexed links work with these API, but not sure. If you could try sending a PDF file from google drive and revert on this comment, that would be great, Cheers!

  • @hekaidonghe1177
    @hekaidonghe1177 2 ปีที่แล้ว

    Hi
    Can I send bulk message to customers。

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว

      Yes, here's how to do it! th-cam.com/video/PVFDQeVyeQw/w-d-xo.html

  • @joymajumder4348
    @joymajumder4348 ปีที่แล้ว

    How can I send a pdf from my local folder by using the path of the file?

    • @VinixCode
      @VinixCode  ปีที่แล้ว +1

      Joy, we'll be covering that topic in our next video. Stay tuned.

    • @achrafassila7438
      @achrafassila7438 ปีที่แล้ว

      hy did you find a way to send a pdf from local folder ??

    • @duygukocar7623
      @duygukocar7623 ปีที่แล้ว

      @@VinixCode Hi, which video include this now ?

  • @tirumaninadar1352
    @tirumaninadar1352 2 ปีที่แล้ว

    can we send file link as php url?

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว

      Tirumani, yes you can. Just make sure that this PHP script sets the correct http headers such as "Content-Type: image/jpeg" for a JPG image, and such.

  • @sindaniel_
    @sindaniel_ 2 ปีที่แล้ว

    Bro, do you know how to get files sent by users?

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว

      I do know, Daniel. Will cover that topic in one of our next videos!

  • @josmanperez3174
    @josmanperez3174 ปีที่แล้ว

    Hola cómo envío un mensaje a un grupo ya creado ?

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      Josman, no se puede enviar mensajes a grupos con la API de WhatsApp

  • @carlosc6799
    @carlosc6799 ปีที่แล้ว

    Hello can you send multiple Files at once? So i want to send 10 files, can I send 10 all at once?

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      No, it's not possible.

  • @hakimfazal426
    @hakimfazal426 ปีที่แล้ว

    in my case no error show same response as your but document and file not receiving.only text message receive.can you help me what is the problem?

    • @VinixCode
      @VinixCode  ปีที่แล้ว

      Make sure you're sending a file with the correct formats.

    • @hakimfazal426
      @hakimfazal426 ปีที่แล้ว

      @@VinixCode format is correct it show same response

    • @hakimfazal426
      @hakimfazal426 ปีที่แล้ว

      @@VinixCode my templates are also rejecting.with unkown error please guide me..are they accept to send invoices on whatsapp?

    • @Richard.0991
      @Richard.0991 ปีที่แล้ว

      Read my solution in the comments section

  • @jairup8908
    @jairup8908 4 หลายเดือนก่อน

    Important quest: how to send HIGH definition images using whatsapp cloud api ! ?

  • @muhammedshamnas7414
    @muhammedshamnas7414 2 ปีที่แล้ว

    How to interact(send and receive and replay) with people Using WhatsApp Business API

    • @VinixCode
      @VinixCode  2 ปีที่แล้ว

      Muhammed, there’s another video about it in this channel.

  • @ahamedbilal9868
    @ahamedbilal9868 4 หลายเดือนก่อน

    Is this api is free

    • @ares7785
      @ares7785 2 หลายเดือนก่อน

      Yeap man ? They have the test account that is enough to create an app