Skip to content

modify the way to enter the login verification code #227

Answered by SachukS
zybot666 asked this question in Q&A
Discussion options

You must be logged in to vote

I think you need to write your own ClientInteraction class, and then assign it to your client like in this code below:

public static void loginClient(Partner partner) {
        LOG.error("Telegram login");
        APIToken apiToken = new APIToken(111111, "token");
        TDLibSettings settings = TDLibSettings.create(apiToken);

        Path sessionPath = Paths.get("tdlight-session-"+partner.getPhone());
        settings.setDatabaseDirectoryPath(sessionPath.resolve("data"));
        settings.setDownloadedFilesDirectoryPath(sessionPath.resolve("downloads"));

        SimpleTelegramClientBuilder clientBuilder = simpleTelegramClientFactory.builder(settings);

        SimpleAuthenticationSupp…

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cavallium
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #220 on August 28, 2024 12:18.