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
})();

TL schema

Parameters

Name

Type

Description

flags

write_allowed

Set this flag to allow the bot to send messages to you (if requested)

peer

The location of the message

msg_id

Message ID of the message with the login button

button_id

ID of the login button

Result

UrlAuthResult

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Handle Seamless Telegram Login URL authorization requests.

Last updated

Was this helpful?