BlogWhatsApp

How to open your app from WhatsApp links

· 7 min read · By the Strait team

What really happens when someone taps your link in WhatsApp, the three kinds of request WhatsApp sends, how to get a rich preview, how to make the tap open your app instead of a web page, and how to count WhatsApp as a channel.

For many Indian apps, WhatsApp is the channel that matters: broadcasts, group shares, support chats, referral invites. So "does the link open the app?" is mostly a WhatsApp question. This post walks through what happens between a WhatsApp message and your app's screen, and what to set up so the link opens your app.

A link in WhatsApp produces up to three different kinds of request, and a link server has to tell them apart:

Three requests a WhatsApp link can produceWhen the link is sent, WhatsApp fetches it to build a preview. When it is tapped, either the phone opens the app directly through a verified link, or a web view inside WhatsApp loads the link and the server shows an Open in app page. WhatsApp link Preview fetchwhen it's sent System tapverified link Web view tapinside WhatsApp preview pagenever counted app openson the screen "Open in app"page, one tap
Each request needs a different answer: a preview, nothing at all, or a one-tap way out.
  1. The preview fetch. When a link is sent, WhatsApp fetches the page itself to build the preview card. Nobody tapped anything.
  2. A tap handed to the system. On Android, a link that leaves WhatsApp as a normal "view this URL" request goes through Android's link resolution, so a verified App Link opens your app directly (Android Developers: App Links).
  3. A tap inside a web view. Some versions and phones load the page in an embedded browser instead. The operating system never sees the link, so it can't open your app.

Request 1: the preview fetch

The preview card is built from the page's Open Graph tags. Meta's documentation for WhatsApp lists og:title, og:description, og:url and og:image. The image should be under 600 KB, at least 300 px wide, with an aspect ratio of 4:1 or narrower, and the tags must appear within the first 300 KB of the HTML (Meta: WhatsApp link previews).

Here's the catch for a link server: the preview fetcher names itself WhatsApp/… in its user agent, and so does a real person in WhatsApp's web view. The difference is the prefix. A browser's user agent starts with Mozilla/5.0; the fetcher's doesn't. Here is a simplified version of the rule our engine uses:

JavaScript
// Chat-app preview fetchers name the app without a browser prefix.
const CHAT_PREVIEW = /whatsapp|slack|telegram|discord/i;

function classify(ua = '') {
  if (!ua.trim()) return 'bot';                                  // no user agent: a script
  if (CHAT_PREVIEW.test(ua) && !/^Mozilla\//.test(ua)) return 'preview';
  if (/\bWhatsApp\b/i.test(ua)) return 'whatsapp-webview';       // a person, inside WhatsApp
  return 'browser';
}

Get this wrong in one direction and every message counts as a tap nobody made, and may even send a robot to the Play Store. Get it wrong in the other and you miss real people. An early version of our engine did the second: it counted WhatsApp web-view taps as preview robots until we split the two cases on that prefix.

With Strait, preview fetchers get a page with the title, description and image you set on the link, are never redirected, and are never counted as taps. You can see what a chat app will show with the link preview checker.

Request 2: make the system tap open your app

This is the path you want most taps to take, and it depends entirely on verification:

  • Android: an intent filter with android:autoVerify="true" for your link domain, and an assetlinks.json on that domain listing every SHA-256 fingerprint your app is signed with, including the Play App Signing key. Since Android 12, an unverified https link opens the default browser instead of your app (Android 12 behaviour changes).
  • iPhone: the Associated Domains entitlement and an apple-app-site-association file. Strait's iPhone links were tested on a real iPhone in October 2026.

Strait serves both files on your link domain from the details in Dashboard → Settings (App Links & Universal Links). Check them with the App Links checker before you send a broadcast.

A tap that opens the app directly never goes through the link server's redirect, so it is counted when your app reports the open through the SDK. The SDK resolves the short link to its destination, and your code gets the path:

TypeScript
links.onLink((e) => {
  if (e.matched && e.path) openPath(e.path, e.params); // e.g. /product/42
});

Request 3: the web view inside WhatsApp

When a WhatsApp tap does load in a web view, the user agent carries a browser prefix and the WhatsApp token, so the server knows where it is. A redirect is the wrong answer here, because the web view would just load the store page or website inside WhatsApp.

On Android, the useful answer is a small page with one big Open in app button whose link is an intent:// URL. Chrome's documentation describes the format and its S.browser_fallback_url, used when the app isn't installed (Chrome for Developers: Android Intents with Chrome). Web views usually honour an intent link the person taps. That is what Strait shows: your app's name, icon and colour, Open in app (falling back to Google Play with the link kept, or your website), and a Continue anyway link.

On iPhone, a web page can't reliably break out of another app's web view, so the page explains how to open the link in Safari and offers Get the app.

A WhatsApp invite is often the first time someone meets your app. Without the app, an Android tap goes to Google Play with the link attached in the install referrer, and the first open lands on the link's screen. We tested that path on a real phone with a Google Play internal testing build. The details are in deferred deep linking explained.

Counting WhatsApp as a channel

You want "WhatsApp" in your reports even when nobody remembered to tag the link. Strait picks a tap's channel from the first of these that has a value (REST API reference):

Order Signal Example
1 utm_source on the tapped URL ?utm_source=whatsapp
2 utm_source in the link's destination set once when the link is created
3 The in-app browser the tap came from the WhatsApp token in the user agent
4 The referrer android-app://com.whatsapp or wa.me

The fourth one is worth knowing: when an Android app opens a link in a browser, the browser can send the app as the referrer, so a tap that went through Chrome still names WhatsApp. WhatsApp Business (com.whatsapp.w4b) maps to the same channel.

Tag anyway. utm_source=whatsapp plus a campaign (utm_campaign=diwali-sale) separates a broadcast from organic shares. The UTM builder keeps the names tidy, and our post on UTM parameters for app campaigns in India suggests a naming scheme.

The other direction: opening WhatsApp from your app

People searching for "WhatsApp link" sometimes mean the opposite: a link that opens a WhatsApp chat. That is WhatsApp's own wa.me format. https://wa.me/<number> opens a chat with that number, and https://wa.me/?text=<url-encoded text> opens WhatsApp with a message ready and lets the person pick a contact (WhatsApp Help Center).

The two fit together for referrals: put your deep link inside the message.

TypeScript
import { Linking } from 'react-native';

const invite = 'https://hilltop.strait.link/invite-7f3a?utm_source=whatsapp&utm_medium=referral';
const text = `Join me on Hilltop Shoes Shop and get ₹100 off: ${invite}`;
await Linking.openURL(`https://wa.me/?text=${encodeURIComponent(text)}`);

A pre-broadcast checklist

  • App Links verified for the link domain (and Universal Links, if you ship on iPhone)
  • Link title, description and image set, and the preview checked
  • Tapped from WhatsApp on a real phone, with the app installed and without it
  • Tagged with utm_source=whatsapp and a campaign name
  • The Will it open my app? simulator run for "WhatsApp, Android"

If a tap still opens a web page, the troubleshooting guide lists the checks in order.

Sources and how we checked