TelegramPHP Documentation

PassportApi

This file is generated from spec/openapi.json (Bot API 10.3) by tools/generate.php.

Do not edit it by hand - run composer spec:build instead.

Telegram Passport error reporting.

Mixed into Telegram through Methods. Every method is named exactly as the Bot API names it, takes exactly the fields the Bot API documents (use named arguments for the optional ones), and resolves with the hydrated result.

Tags
link
https://core.telegram.org/bots/api
since

v10.3

Table of Contents

Methods

setPassportDataErrors()  : PromiseInterface<string|int, bool>
Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.

Methods

setPassportDataErrors()

Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.

public setPassportDataErrors(int $user_id, array<int, PassportElementError|array<string|int, mixed>> $errors) : PromiseInterface<string|int, bool>

Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

Parameters
$user_id : int

User identifier

$errors : array<int, PassportElementError|array<string|int, mixed>>

A JSON-serialized Array describing the errors

Tags
link
https://core.telegram.org/bots/api#setpassportdataerrors
Return values
PromiseInterface<string|int, bool>
On this page

Search results