account.getAuthorizationForm
Returns a Telegram Passport authorization form for sharing data with a 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.getAuthorizationForm({
botId: 2663630,
scope: 'random string here',
publicKey: 'random string here',
}));
console.log(result); // prints the result
})();
TL schema
account.authorizationForm#ad2e1cd8 flags:# required_types:Vector<SecureRequiredType> values:Vector<SecureValue> errors:Vector<SecureValueError> users:Vector<User> privacy_policy_url:flags.0?string = account.AuthorizationForm;
---functions---
account.getAuthorizationForm#b86ba8e1 bot_id:int scope:string public_key:string = account.AuthorizationForm;
Parameters
Result
Possible errors
Code
Type
Description
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?