account.acceptAuthorization
Sends a Telegram Passport authorization form, effectively sharing data with the service
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.acceptAuthorization({
botId: 2982749,
scope: 'random string here',
publicKey: 'random string here',
valueHashes: [new Api.SecureValueHash({...})],
credentials: new Api.SecureCredentialsEncrypted({...}),
}));
console.log(result); // prints the result
})();
TL schema
boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
account.acceptAuthorization#e7027c94 bot_id:int scope:string public_key:string value_hashes:Vector<SecureValueHash> credentials:SecureCredentialsEncrypted = Bool;
Parameters
Name
Type
Description
Result
Possible errors
Code
Type
Description
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?