version: 2.1.3


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. 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.


user_id int User identifier Optional
errors Array of PassportElementError A JSON-serialized array describing the errors Yes
token String You can use this method on another bot with specify this parameter Optional
return_array Boolean Specify the result type , if pass true results will be array otherwise will be object Optional
forgot Boolean You can set to not receive request result, dont set it or pass null for turn it off Optional
answer Boolean You can set to answer to webhook, dont set it or pass null for turn it off Optional

Method errors

required parameters not found required parameter for this method is not founded. you can see them in log
answer mode not allowed you can use answer mode only once for each webhook update and you already did
answer mode not allowed bc multi you can't use answer mode when multi is on

Method examples

$this->setPassportDataErrors(['user_id' => int, 'errors' => Array of PassportElementError]);
$this->setPassportDataErrors(['errors' => Array of PassportElementError]);

Method alices

Method output :