Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

357
Views
Difference between these two formats to open the Whatsapp app from a webpage

I've found two ways to open the Whatsapp app from a webpage,

<a href="whatsapp://send?text=Hello&phone=+1123456789">whatsapp</a>

and

<a href="https://api.whatsapp.com/send?phone=+1123456789&text=Hello">whatsapp</a>

I understand the first one works on phone only but apart from that what are the differences between the two?

In my trials I've found that the api method doesn't always work properly in certain mobile browsers. In some cases it doesn't detect the installed app and takes me to the Appstore to install the app.

Does the first method work across all platforms and browsers?

Is it safe to use JavaScript to detect the platform (desktop or mobile) and then load the appropriate link format?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The first approach usually requires the browser / OS to understand how to handle the whatsapp:// protocol. This usually requires some setup beforehand (e.g. registering a protocol in Chrome, or a deep link schema in Android), and the browser / OS will pass the request to whatever app / program can handle it.

The second approach doesn't require any setup, and passes the request to WhatsApp's API directly. This is less likely to completely fail, but as you've seen may have issues on mobile when an app claims it should handle all requests to the domain.

You're better off following WhatsApp's documentation, and using their wa.me domain for a universal link:

Universal links can also include a pre-filled message that will automatically appear in the text field of a chat. Use https://wa.me/whatsappphonenumber/?text=urlencodedtext where whatsappphonenumber is a full phone number in international format and urlencodedtext is the URL-encoded pre-filled message.

Example: https://wa.me/15551234567?text=I'm%20interested%20in%20your%20car%20for%20sale

This will handle all the complexities for you. For example, on Android that URL opens the WhatsApp app, on Windows that universal link redirects to the api.whatsapp.com URL, and Chrome asks if I want to use my installed WhatsApp program for it: dialog to open whatsapp on windows via url

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!