sign_up()¶
- Client.sign_up()
Register a new user in Telegram.
Usable by Users Bots
- Parameters:
phone_number (
str) – Phone number in international format (includes the country prefix).phone_code_hash (
str) – Code identifier taken from the result ofsend_phone_number_code().first_name (
str) – New user first name.last_name (
str, optional) – New user last name. Defaults to “” (empty string, no last name).
- Returns:
User– On success, the new registered user is returned.- Raises:
raises ~pyrogram.errors.BadRequest: In case the arguments are invalid.