How much length can be of a Telegram user_id?
Asked Answered
G

4

8

I am making a database in which my algorithm only accepts queries from users with telegram id length of 9.

user_id: 123456789;
length = user_id.length;
display(length);

OUTPUT: 9

Are there telegram user ids of length lesser than 9?
Can anybody suggest something, so that i can update my algorithm to length of that ids too.

Genteel answered 15/7, 2018 at 18:52 Comment(0)
S
5

You can refer to Contact section of API document.

it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.


2018 (Outdated):

There have no known limit of user ID, but I know there have some user have less than 9 digits ID.

For instance, @MarkusRa have 6-digits ID.

The maximum length I have seen is 9 digits, and starts with 6, it seems to increase by time, maybe it will have 10 digits soon

Sketchy answered 16/7, 2018 at 4:37 Comment(2)
official Telegram account's ID is also 6 digits number:777000Partnership
Currently Telegram account's ID MAX length is 10 in 2022 the length might increase as the users increaseJackfruit
P
10

Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

Telegram Bot API#Chat

Poddy answered 15/7, 2018 at 19:37 Comment(0)
S
5

You can refer to Contact section of API document.

it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier.


2018 (Outdated):

There have no known limit of user ID, but I know there have some user have less than 9 digits ID.

For instance, @MarkusRa have 6-digits ID.

The maximum length I have seen is 9 digits, and starts with 6, it seems to increase by time, maybe it will have 10 digits soon

Sketchy answered 16/7, 2018 at 4:37 Comment(2)
official Telegram account's ID is also 6 digits number:777000Partnership
Currently Telegram account's ID MAX length is 10 in 2022 the length might increase as the users increaseJackfruit
O
2

I have seen 10 digits user ID starts with 5, it exceeds int32 max value.

Obediah answered 6/8, 2022 at 13:44 Comment(0)
K
0

Today I saw two guys who have a double-digit ID

@Ruslan_Ozdoev : 25 @Akhmedoff_J : 55

(6 Digit) @MarkusRa : 914597

Karyotype answered 2/1, 2024 at 22:18 Comment(1)
Does these account for sell?Repression

© 2022 - 2025 — McMap. All rights reserved.