WhatsApp vs Telegram Number Lookup: Run One Check or Both?

Published August 23, 2026 · UpdatedOctober 16, 2026

You holdPay forDo not pay for
A phone, and the send path is already WhatsAppcheck-exist-by-phoneTelegram, and any WhatsApp profile call before isExist is True
A handle, no phonecheck-exists with peer=@some_usernameWhatsApp — it has no username input
The same contact on two networksboth checks, two userHash valuesone cache key, one merged "registered" boolean
A shop card, last-seen, or About on WhatsAppWhatsApp consume ops on the WhatsApp hashthe Telegram hash; Telegram has no business card
A Telegram bio or avatarTelegram consume ops on the Telegram hashthe WhatsApp hash — it is rejected there

That table is the article. This is not a third existence tutorial. The WhatsApp number lookup already teaches the WhatsApp mint; the Telegram number checker already teaches the Telegram mint. What you choose here is which mint to pay for for one contact, and how to keep the two answers from collapsing into a lie.

One authorized platform key from the dashboard (sign in if you do not have an account) covers both /api/project/whatsapp/… and /api/project/telegram/…. Read it from OPENDATA_API_KEY on the server. The key travels in the query string, so those URLs do not belong in tickets, screenshots, shared docs or git. Opening this page or copying the script does not send a lookup. Running it does, and each project you call spends its own credits.

One number is two independent answers

+15551234567 is one E.164 string and two questions. WhatsApp answers whether that number is a WhatsApp account. Telegram answers whether that peer exists on Telegram. Neither network consults the other. A WhatsApp hit is not evidence for Telegram. A Telegram miss is not evidence for WhatsApp.

Run WhatsApp only when the next hop is already WhatsApp: a consumer list, shop onboarding, or any flow whose next call is get-biz-profile, get-avatar, get-about or get-presence. Run Telegram only when the identifier is a handle (@some_username or a bare username), a user:<id>, or a community that lives on Telegram. WhatsApp has no username field; a handle-only row cannot be forced through check-exist-by-phone. Run both when the same phone might be reachable on either network and you will pick the channel from the result, not from a hunch about the country. Hit rates move by market. Sample your own list rather than assuming WhatsApp always wins. The lead verification workflow scores many channels; this chooser stops at these two.

Do not skip the second check because the first one hit. Coverage is not transitivity. A contact on WhatsApp can be absent from Telegram, and the reverse is common in handle-first communities. Two networks means two billed existence reads when you actually need both answers — not one read you reuse as a proxy for the other. If the campaign already picked a channel, pay for that channel only.

What each check actually returns

Both checks are cheap existence reads. Both mint a userHash only when the account exists, valid for 24 hours, and both reject a missing, unknown or expired hash on the heavier calls. That is where the similarity ends. The hashes are not interchangeable. A WhatsApp hash sent to Telegram get-about is a bad ticket, not a shortcut.

WhatsApp check-exist-by-phone takes phoneNumber — digits of a full international number; +, spaces, dashes and a 00 prefix are tolerated. The documented example 15551234567 is a shape, not a promised live account. The payload's isExist is three-state: true, false, or null (undetermined — retry the check, do not enrich). On a true, you also get userHash and hasExtra. batch-check-10 screens up to ten numbers and does not mint a hash. check-active is a direct active flag and also does not mint. If the next hop is a profile field, you still need check-exist. Country code and national number already in separate columns can go through check-exist-by-cc-phone instead of concatenating them yourself.

Telegram check-exists takes peer: +phone (leading plus required; requests encodes it, a hand-built URL needs %2B), @username / bare username, or user:<id>. exists is true or false, with a reason such as PHONE_NOT_OCCUPIED on a clean miss. A hit also returns the numeric user id, username, display name, and userHash. There is no batch helper and no business-card operation. get-picture returns base64 data plus pictureSet; get-about returns the bio. A group or channel peer is a business failure, not a person.

HTTP success is not a registration flag. Read the HTTP status first, then the gateway envelope {code, message, data}. Gateway code=200 means the check was delivered. Only then read isExist or exists. A missing key, a validation error or a transport failure is HTTP 4xx/5xx or a gateway code other than 200 — no verdict, so do not write false on either network. Unwrap data until you see the inner fields; the platform may wrap more than once. A delivered WhatsApp null is still undetermined, not a crash. A delivered Telegram exists=false with a reason is a clean miss; do not retry it as transport.

WhatsApp is the side with a shop card and privacy-gated presence. Telegram is the side that resolves a handle. If you need the full WhatsApp consume path, stay on that lookup guide; if you need the Telegram mint-and-spend window, stay on the checker. This page only tells you not to point those consume calls at the other network's hash.

One script, two hashes, no shared cache

The script is the chooser in code: call only the networks you will use, store each answer under its own key, never OR the flags, never store a single userHash. Install requests, export OPENDATA_API_KEY, run it on the server. The number and handle are documented shapes, not guaranteed hits.

import os
from datetime import datetime, timedelta, timezone

import requests

ROOT = "https://api.opendata-api.com/api/project"
KEY = os.environ["OPENDATA_API_KEY"].strip()
TTL = timedelta(hours=24)

# Separate caches. A WhatsApp hash is not a Telegram hash.
WA_CACHE = {}  # digits -> record
TG_CACHE = {}  # peer -> record


def unwrap(body):
    while isinstance(body, dict) and "code" in body and isinstance(
        body.get("data"), (dict, list)
    ):
        body = body["data"]
    return body


def call(project, operation, **params):
    try:
        response = requests.get(
            f"{ROOT}/{project}/{operation}",
            params={"key": KEY, **params},
            timeout=30,
        )
    except requests.RequestException:
        raise RuntimeError("Transport failure; inspect redacted logs") from None
    if not 200 <= response.status_code < 300:
        raise RuntimeError(f"HTTP failure: {response.status_code}")
    try:
        envelope = response.json()
    except ValueError:
        raise RuntimeError("Expected JSON") from None
    if not isinstance(envelope, dict) or envelope.get("code") != 200:
        raise RuntimeError("Gateway business failure; no registration verdict")
    data = unwrap(envelope)
    return data if isinstance(data, dict) else {}


def check_whatsapp(number):
    digits = number.lstrip("+")
    now = datetime.now(timezone.utc)
    cached = WA_CACHE.get(digits)
    if cached and cached["expires_at"] > now:
        return cached
    wa = call("whatsapp", "check-exist-by-phone", phoneNumber=digits)
    record = {
        "isExist": wa.get("isExist"),  # True, False, or None
        "userHash": wa.get("userHash"),
        "checked_at": now,
        "expires_at": now + TTL,
    }
    WA_CACHE[digits] = record
    return record


def check_telegram(peer):
    now = datetime.now(timezone.utc)
    cached = TG_CACHE.get(peer)
    if cached and cached["expires_at"] > now:
        return cached
    tg = call("telegram", "check-exists", peer=peer)
    record = {
        "exists": tg.get("exists"),
        "reason": tg.get("reason"),
        "userHash": tg.get("userHash"),
        "checked_at": now,
        "expires_at": now + TTL,
    }
    TG_CACHE[peer] = record
    return record


def lookup(number=None, handle=None, channels=("whatsapp", "telegram")):
    """Call only the networks you will actually use. Never merge the flags."""
    out = {}
    if number and "whatsapp" in channels:
        out["whatsapp"] = check_whatsapp(number)
    if "telegram" in channels:
        peer = handle or (("+" + number.lstrip("+")) if number else None)
        if not peer:
            raise ValueError("Telegram needs a phone peer or a handle")
        out["telegram"] = check_telegram(peer)
    return out


# Documented shapes, not guaranteed hits.
print(lookup(number="+15551234567", channels=("whatsapp",)))
print(lookup(handle="@some_username", channels=("telegram",)))
print(lookup(number="+15551234567"))  # both, two hashes

Reuse each hash only inside its own 24-hour window and only on its own project. Re-checking WhatsApp to "refresh" a Telegram ticket wastes a WhatsApp credit and still leaves you without a Telegram hash. Cache a clean miss per network so you do not pay to hear false twice on the same side. Classify WhatsApp with is True / is False / is None — Python truthiness merges null with a miss. If you later send, the WhatsApp messaging guide and the Telegram messaging guide both start from a recipient that already passed that network's check.

Do not merge the two registered flags

These are the anti-goals. Crossing them is how a chooser turns into a bad lead table.

  • Do not write registered = wa_isExist or tg_exists. That boolean cannot tell a sender which network to use, and it hides a WhatsApp null behind a Telegram hit.
  • Do not copy wa_hash into Telegram get-about / get-picture, or tg_hash into WhatsApp get-avatar / get-about / get-biz-profile. Each consume operation accepts only the hash minted by its own check.
  • Do not treat WhatsApp isExist is None as Telegram exists is False, or as permission to skip Telegram.
  • Do not skip the second check because the first one hit. Independent networks do not imply each other.
  • Do not key one cache with the E.164 string and store a single hash. Key WhatsApp by digits, Telegram by peer, and keep checked_at on each row.
  • Do not take HTTP 2xx or gateway code=200 as "registered on both". Delivery is not existence.
  • Do not force a handle through WhatsApp, and do not drop the plus on a Telegram phone peer.
  • Do not enrich either side until that side's flag is a real hit (isExist is True / exists is True). Empty bios and missing photos on a hit are still normal outcomes, not transport errors.

If a row needs one channel, pay for one check. If a row needs both channels, pay for both checks and keep two hashes. Never pay once and pretend you learned two networks.