messages.acceptUrlAuth
Use this to accept a Seamless Telegram Login authorization request, for more info click here »
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.messages.acceptUrlAuth({
writeAllowed: true,
peer: new Api.InputPeer({...}),
msgId: 9723223,
buttonId: 3768630,
}));
console.log(result); // prints the result
})();import {Api, TelegramClient} from 'telegram';
import {StringSession} from 'telegram/sessions';
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result: Api.UrlAuthResult = await client.invoke(new Api.messages.acceptUrlAuth({
writeAllowed: true,
peer: new Api.InputPeer({...}),
msgId: 9723223,
buttonId: 3768630,
}));
console.log(result); // prints the result
})();TL schema
Parameters
Result
Possible errors
Code
Type
Description
Can bots use this methd ?
yes
Related pages
Handle Seamless Telegram Login URL authorization requests.
Last updated
Was this helpful?