Skip to content
This repository was archived by the owner on Dec 5, 2021. It is now read-only.
This repository was archived by the owner on Dec 5, 2021. It is now read-only.

AUTH_KEY_UNREGISTERED when using custom sessionUserId #654

@messire

Description

@messire

Hi, guys! @sochix @marshallmick007 @ahmadalli @ra0o0f @Starli0n

What I do:

  1. Create client
    TelegramClient client = new TelegramClient(Api_Id, Api_Hash, sessionUserId: guid);
    bool connectionResult = await client.ConnectAsync();
    string hash = await client.SendCodeRequestAsync(phone);
    TLUser user = await client.MakeAuthAsync(phone, hash, code);

It's ok on this step

  1. Then I close app and run again.
  2. TelegramClient client = new TelegramClient(Api_Id, Api_Hash, sessionUserId: guid);
    bool connectionResult = await client.ConnectAsync();
    var dialogs = await client.GetUserDialogsAsync();

and now I have message 'AUTH_KEY_UNREGISTERED'


but if not using custom sessionUserId and creating and using by default new TelegramClient(Api_Id, Api_Hash) - it's all ok and no one error messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions