Closed xndrpr closed 6 months ago
This worked for me:
let request = tl::functions::auth::ExportLoginToken {
api_id: env::var("API_ID").unwrap().parse().unwrap(),
api_hash: env::var("API_HASH").unwrap(),
except_ids: vec![],
};
let result = self.client.invoke(&request).await.unwrap();
// Then
let url = format!("tg://login?token={}", base64_url::encode(&bytes));
// And after qr code is scanned
let result = self.client.invoke(&request).await.unwrap(); // again
// You are signed in
I don't have plans to create a friendly method for this, and the raw API solution should work for those who need it.
I would like to create a QR code login for my Telegram client, but the auth.exportLoginToken implementation is missing. I'd be grateful if you could implement this!
https://core.telegram.org/method/auth.exportLoginToken