SendVerifyEmailCodeRequest

Only users can use this request. See code examples.

---functions---
account.sendVerifyEmailCode#98e037bb purpose:EmailVerifyPurpose email:string = account.SentEmailCode

Returns

account.SentEmailCode

This type can only be an instance of:

SentEmailCode

Parameters

purposeEmailVerifyPurpose
emailstring

Known RPC errors

This request can cause 1 known error:

EmailInvalidErrorThe given email is invalid.

You can import these from telethon.errors.

Example

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.account.SendVerifyEmailCodeRequest(
        purpose=types.EmailVerifyPurposeLoginSetup(
            phone_number='some string here',
            phone_code_hash='some string here'
        ),
        email='some string here'
    ))
    print(result.stringify())