Telegram MT v0.1.1-alpha MTProto.API.Auth View Source

Auth.* See core.telegram.org/schema.

Link to this section Summary

Functions

Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one

Returns information on whether the passed phone number was registered

Returns data for copying authorization to another data-centre

Logs in a user using a key transmitted from his native data-centre

Logs out the user

Terminates all user’s authorized sessions except for the current one

Makes a voice call to the passed phone number. A robot will repeat the confirmation code from a previously sent SMS message

Sends an confirmation code message to the specified phone number via SMS

Saves information that the current user sent SMS-messages with invitations to its unregistered contacts

Forces sending an SMS message to the specified phone number

Signs in a user with a validated phone number

Registers a validated phone number in the system

Link to this section Functions

Link to this function bind_tmp_auth_key(perm_auth_key_id, nonce, expires_at, encrypted_message) View Source

Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one.

Returns information on whether the passed phone number was registered.

  • phone - phone number, international format (ex: 0041760000000).
Link to this function export_authorization(dc_id) View Source

Returns data for copying authorization to another data-centre.

Link to this function import_authorization(user_id, auth_key) View Source

Logs in a user using a key transmitted from his native data-centre.

Logs out the user.

Terminates all user’s authorized sessions except for the current one.

Link to this function send_call(phone_number, phone_code_hash) View Source

Makes a voice call to the passed phone number. A robot will repeat the confirmation code from a previously sent SMS message.

Link to this function send_code(phone, sms_type \\ 0, lang \\ "en") View Source

Sends an confirmation code message to the specified phone number via SMS.

  • phone - phone number, international format (ex: 0041760000000).
  • sms_type - message text type.

    • 0 - message contains a numerical code (Default).
    • 1 (deprecated) - message contains a link {app_name}://{code}.
    • 5 - message sent via Telegram instead of SMS.
  • lang - code for the language used on a client, ISO 639-1 standard. Default value is "en".
Link to this function send_invites(phone_numbers, message) View Source

Saves information that the current user sent SMS-messages with invitations to its unregistered contacts.

Link to this function send_sms(phone_number, phone_code_hash) View Source

Forces sending an SMS message to the specified phone number.

Link to this function sign_in(phone_number, phone_code_hash, phone_code) View Source

Signs in a user with a validated phone number.

Link to this function sign_up(phone_number, phone_code_hash, phone_code, first_name, last_name) View Source

Registers a validated phone number in the system.