Telegram MT v0.0.1-alpha MTProto.API.Auth

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

Summary

Functions

Returns information on whether the passed phone number was registered

Logs out the user

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

Signs in a user with a validated phone number

Functions

check_phone(phone)

Returns information on whether the passed phone number was registered.

  • phone - phone number, international format (ex: 0041760000000).
log_out()

Logs out the user.

send_code(phone, sms_type \\ 0, lang \\ "en")

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".
sign_in(phone_number, phone_code_hash, phone_code)

Signs in a user with a validated phone number.