mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-11-09 10:30:35 +00:00
Update install/test server docs and add new known RPC error
This commit is contained in:
@@ -25,13 +25,13 @@ so don't store sensitive data here.
|
||||
|
||||
Valid phone numbers are ``99966XYYYY``, where ``X`` is the ``dc_id`` and
|
||||
``YYYY`` is any number you want, for example, ``1234`` in ``dc_id = 2`` would
|
||||
be ``9996621234``. The code sent by Telegram will be ``dc_id`` repeated five
|
||||
times, in this case, ``22222`` so we can hardcode that:
|
||||
be ``9996621234``. The code sent by Telegram will be ``dc_id`` repeated six
|
||||
times, in this case, ``222222`` so we can hardcode that:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
client = TelegramClient(None, api_id, api_hash)
|
||||
client.session.set_dc(2, '149.154.167.40', 80)
|
||||
client.start(
|
||||
phone='9996621234', code_callback=lambda: '22222'
|
||||
phone='9996621234', code_callback=lambda: '222222'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user