Telegram::sendContact PHP Method

sendContact() public method

Use this method to send phone contacts. On success, the sent Message is returned.


Values inside $content:
Parameters Type Required Description
chat_id Integer or String Yes Unique identifier for the target chat or username of the target channel (in the format @channelusername)
phone_number String Yes Contact's phone number
first_name String Yes Contact's first name
last_name String Optional Contact's last name
disable_notification Boolean Optional Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
reply_to_message_id Integer Optional If the message is a reply, ID of the original message
reply_markup InlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardHide or ForceReply Optional Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to hide keyboard or to force a reply from the user.
\param $content the request parameters as array \return the JSON Telegram's reply
public sendContact ( array $content )
$content array
    public function sendContact(array $content)
    {
        return $this->endpoint("sendContact", $content);
    }