account.saveSecureValue
Securely save Telegram Passport document, for more info see the passport docs »
Example
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result = await client.invoke(new Api.account.saveSecureValue({
value: new Api.InputSecureValue({...}),
secureSecretId: 6809972,
}));
console.log(result); // prints the result
})();
TL schema
secureValue#187fa0ca flags:# type:SecureValueType data:flags.0?SecureData front_side:flags.1?SecureFile reverse_side:flags.2?SecureFile selfie:flags.3?SecureFile translation:flags.6?Vector<SecureFile> files:flags.4?Vector<SecureFile> plain_data:flags.5?SecurePlainData hash:bytes = SecureValue;
---functions---
account.saveSecureValue#899fe31d value:InputSecureValue secure_secret_id:long = SecureValue;
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?