![]() If 2FA is enabled, ndCode will return a SESSION_PASSWORD_NEEDED RPC error, asking the user to enter the 2FA password, without sending any authorization code.If 2FA is not enabled, ndCode will is directly return an ntCodeSuccess constructor with session info, indicating the session is authorized.If any of the future auth tokens matches the account we're trying to login into and the token hasn't expired: When invoking ndCode, all future auth tokens present in the database should be provided to codeSettings.logout_tokens. When invoking auth.logOut on a previously authorized session, the server may return a future_auth_token, which should be stored in the local database.Ī future_auth_token is also contained in the thorization returned when logging in.Īt all times, the future auth token database should contain at most 20 tokens: evict older tokens as new tokens are added to stay below this limit. However, this is not always the case, if future auth tokens are used: Future auth tokens Then, a text message containing an authorization code is sent to the user's phone using ndCode. The untriesList config and other configuration values are then used as described here ». To show a nicely formatted and validated phone number field, the untriesList constructor can be obtained using the help.getCountriesList method. Sending a verification codeĮxample implementations: telegram for android, tdlib. To log in as a bot, follow these instructions ».Īn alternative QR code-based login flow is also available ». No additional parameters need to be passed into methods following authorization. ![]() Authorization is associated with a client's encryption key identifier: auth_key_id.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |