Whatsapp Click-to-Chat "Couldn't open link" Error Chrome Android/iPhone

14,393

Solution 1

It seems that chrome does not accept click to chat without a number specified. Once there's a number in the URL it works just fine.
Unfortunately I did not find a hack to get around it. Neither of this worked:
https://wa.me//?text=Hello%20World
https://wa.me/0/?text=Hello%20World
only if a proper number is specified it will open WhatsApp, but has the recipient already pre selected (the number we provide).

I tested it for a client about 2 weeks ago, when it still worked. So the last update of Chrome (from Aug 26) seems to be the problem...

Solution 2

If you use https://api.whatsapp.com/send instead of https://wa.me/ you don't need to specify a phone number.

e.g

https://api.whatsapp.com/send?text=Your%20Custom%20Text

Solution 3

The best is to use the custom url scheme format. Universal links do not work well with native clients

whatsapp://send/?phone=&text&source&data

It will work without phone number also.

My issue on a recent breaking-change: Universal links stopped working

There was a great blog post about the issue, however it is already outdated and proposes a php specific solution (nevertheless might gives you a good idea, how to think about the problem)

Solution 4

const text = "Hello..."

const phoneNumber = "23400000000000"


Linking.openURL(`whatsapp://send?text=${text}&phone=${phoneNumber}`)
Share:
14,393

Related videos on Youtube

Alexandru Buhai
Author by

Alexandru Buhai

Computer science student with a strong foundation in the fundamentals of OOP, coding and game development. Excellent communication skills with the ability to act quickly, to prioritize and to resolve issues under pressure. Love participating in hackathons, game jams and tech conferences. Passionate about efficiency, time management and software methodologies. Languages: C#, Java, C++, SQL, Python, JavaScript. Technologies: Git, Linux, Unity3D, WordPress, React.

Updated on September 16, 2022

Comments

  • Alexandru Buhai
    Alexandru Buhai over 1 year

    I'm using Whatsapp Click-to-chat functionality, without a phone number. It previously worked but with the new Chrome version 76.0.3809.132, both on iOS and Android is not working anymore. On Android, it's showing a Toast with Couldn't open link. Tried contacting Whatsapp Support but no answer as of yet. With the latest update their own documentation example is not working, link to docs. Any suggestions or experiences?

    Link example:

    <a target="_blank" href="https://wa.me/?text=Villa%20stone%20road%20piece%2015%20meters%20from%20the%20asphalt%20street" title="Share on WhatsApp">
    

    Error picture Imgur: picture

    A table with my tested devices and versions on Imgur

  • Alexandru Buhai
    Alexandru Buhai over 4 years
    Thanks for the confirmation, that's pretty much what I discovered too, found a hack around it, but I'll just wait for a new Chrome update. For the hack: I changed the link from wa.me directly to api.whatsapp.com/send?phone=&text=<insertTextHere>&source=&d‌​ata=
  • Andrew David Tanner
    Andrew David Tanner over 4 years
    Yeah this does the trick (tested on Android too). The documentation here: faq.whatsapp.com/en/iphone/26000030/?category=5245251 is incorrect.
  • Arpan Jain
    Arpan Jain about 2 years
    This doesnt seem to work for safari at all places. Had to use api.whatsapp.com/send?text=Your%20Custom%20Text