6

I want to send an image via the Whatsapp Click to Chat URL. Sending Text is easy.

https://wa.me/?text=LoremIpsum

When I click this link, it opens WhatsApp, and I can select which contact I want to send the message.

Now my question is, if its possible to also send an image through this URL. (maybe with an ?media=https://cdn.example.com/image.jpg parameter). The goal is to send an email to customers and let them click on a link so they can send an image from us to their friends.

Do I need WhatsApp Business for this? Or isn't it possible?

Thanks for any answer.

F. Beer
  • 69
  • 1
  • 1
  • 2
  • Refer https://developers.facebook.com/docs/whatsapp/api/messages/media/ – Sumesh TG Nov 29 '18 at 12:42
  • 6
    This is not the answer to my question. I know that there is an whatsapp business api. But I asked if there is a possibility to give the user an URL where he clicks on and then he selects a reciever ad than an image will be sended to him. – F. Beer Nov 29 '18 at 12:55
  • You should upload the file before sending it to the receiver. Why don't you read that from there docs? Create a custom application as per the documentation and give the custom URL to the user. From your custom application send your images through `POST` request as per WhatsApp api. – Sumesh TG Nov 29 '18 at 12:58
  • Well, we all are looking for exactly that but that is not something which is yet available and nor do I think it's going to be available. – Harshit Peer May 06 '20 at 15:10
  • I think this is what you are looking for https://stackoverflow.com/questions/70169236/add-file-in-whatsapp-desktop-chat-from-winform-c-sharp/70180397#70180397 – Wei Chen Chen Apr 14 '22 at 07:52
  • @SumeshTG The whatsapp message has to go from UserX to UserY, not from businessPhoneNumber to UserY. The whatsapp business API does not provide a way to do that. – ack_inc Apr 13 '23 at 04:10

1 Answers1

-1

This is impossible with uri, but you can use Intents on android or use Navigator.share() method on webpages using javascript:

Android Intent: https://developer.android.com/training/sharing/send

Web Share: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share

There are similar ways for other operating systems such as iOS, Windows, ...

amir_a14
  • 1,478
  • 10
  • 15
  • The share option is useful to trigger a phone's share feature but it won't link you to whatsapp directly. – Sarfaraaz Nov 15 '22 at 14:29
  • @Sarfaraaz On android, you can pass whatsapp package name to share on whatsapp directly. see: https://developer.android.com/reference/android/content/Intent#setPackage(java.lang.String) – amir_a14 Nov 16 '22 at 12:03
  • Indeed. my comment was related to the navigator.share option – Sarfaraaz Nov 17 '22 at 11:03