Last updated 4 years ago
Was this helpful?
Verify an email address for telegram .
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.verifyEmail({ email: 'random string here', code: 'random string here', })); 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.Bool = await client.invoke(new Api.account.verifyEmail({ email: 'random string here', code: 'random string here', })); console.log(result); // prints the result })();
boolFalse#bc799737 = Bool; boolTrue#997275b5 = Bool; ---functions--- account.verifyEmail#ecba39db email:string code:string = Bool;
Name
Type
Description
email
The email to verify
code
The verification code that was received
Code
400
EMAIL_VERIFY_EXPIRED
The verification email has expired