Debian Codegraph @

docs/socialaccount/providers/telegram.rst

raw
1 Telegram
2 --------
3
4 Telegram does not strictly regulate the authorization expiration
5 time, so you may need to set your own expiration time, which can be
6 less than the default value.
7 You can also set this parameter in Social applications settings as
8 json ``{"auth_date_validity": 100}``.
9 The default value of the ``auth_date_validity`` is 30 seconds.
10
11
12 .. code-block:: python
13
14 SOCIALACCOUNT_PROVIDERS = {
15 'telegram': {
16 'APP': {
17 'client_id': '<bot_id>',
18
19 # NOTE: For the secret, be sure to provide the complete bot token,
20 # which typically includes the bot ID as a prefix.
21 'secret': '<bot token>',
22 },
23 'AUTH_PARAMS': {'auth_date_validity': 30},
24 }
25 }
26
27 .. code-block:: python
28
29
30 Attention! If your server time is different from the telegram
31 server time, you need NTP.