% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phone_number_checker.R
\name{check_phone_on_telegram}
\alias{check_phone_on_telegram}
\title{Check whether a single phone number is registered on Telegram}
\usage{
check_phone_on_telegram(
  client,
  phone,
  download_profile_photo = FALSE,
  photo_dir = NULL
)
}
\arguments{
\item{client}{An authenticated [TelegramClient] instance.}

\item{phone}{Phone number string in international format
(e.g. `"+15551234567"`).}

\item{download_profile_photo}{If `TRUE`, attempt to download the
matched user's profile photo into `photo_dir`
(default: `tempdir()`). Failures are reported as warnings.}

\item{photo_dir}{Directory to save downloaded profile photos; created
if it doesn't exist. Ignored when `download_profile_photo` is
`FALSE`.}
}
\value{
A named list with the user's public fields, or a list with
  an `error` field describing why the lookup failed (no match,
  multiple matches, RPC error, ...).
}
\description{
Adds the phone number to the authenticated account's contacts via
`ImportContactsRequest`, captures any matching user, then removes
the contact via `DeleteContactsRequest`. The contact addition is
transient — Telegram users are not notified.
}
\seealso{
[check_phones_on_telegram()] for batch lookups.
}
