Layer 227
method Users
auth.signIn#8d52a951 flags:# phone_number:string phone_code_hash:string phone_code:flags.0?string email_verification:flags.1?EmailVerification = auth.Authorization;

Parameters

Name Type Description
PhoneNumber string Phone number in the international format
PhoneCodeHash string SMS-message ID, obtained from auth. send Code
PhoneCode flags .0? string Valid numerical code from the SMS-message
EmailVerification flags .1? EmailVerification Email verification code or token

Gogram Example

// AuthSignIn - positional arguments
result, err := client.AuthSignIn("Hello, World!", "Hello, World!", "Hello, World!", nil)
if err != nil {
    // handle error
}
// result is *tg.AuthAuthorization

Possible Errors

Code Type Description
500 AUTH_RESTART Restart the authorization process.
400 PHONE_CODE_EMPTY phone_code is missing.
400 PHONE_CODE_EXPIRED The phone code you provided has expired.
400 PHONE_CODE_INVALID The provided phone code is invalid.
406 PHONE_NUMBER_INVALID The phone number is invalid.
400 PHONE_NUMBER_UNOCCUPIED The phone number is not yet being used.
500 SIGN_IN_FAILED Failure while signing in.
406 UPDATE_APP_TO_LOGIN Please update your client to login.