Change data-center using WTelegramClient

128 Views Asked by At

Using WTelegramClient library, How should I get the list of available telegram data-centers and select another DC?

Link to Telegram API DC descriptions: https://core.telegram.org/api/datacenter

1

There are 1 best solutions below

5
Wizou On

Once connected, you can look at client.TLConfig.dc_options for the available data centers.

However you cannot change DC because a user account is tied to a specific DC and is only allowed to call APIs from that DC (except for file transfers)

So even if you connect to a different DC, once you try to login as a user, Telegram will ask you to reconnect to the correct DC for this user. (WTelegramClient will do this switch automatically)