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

urlAuthResultRequest#92d33a0e flags:# request_write_access:flags.0?true bot:User domain:string = UrlAuthResult;
urlAuthResultAccepted#8f8c0e4e url:string = UrlAuthResult;
urlAuthResultDefault#a9d6db1f = UrlAuthResult;
---functions---
messages.acceptUrlAuth#f729ea98 flags:# write_allowed:flags.0?true peer:InputPeer msg_id:int button_id:int = UrlAuthResult;

Parameters

Result

UrlAuthResult

Possible errors

Can bots use this methd ?

yes

Handle Seamless Telegram Login URL authorization requests.

Last updated