td icon indicating copy to clipboard operation
td copied to clipboard

Invalid phone number error on fragment numbers

Open ne0c0de opened this issue 1 year ago • 11 comments

Hi,

I'm getting Invalid phone number when I try to login with a telegram account with the phone number purchased from fragment.com (whis is an official Telegram project too, and it's an active Telegram account)

Is there any solution for this?

ne0c0de avatar Aug 13 '24 22:08 ne0c0de

You can receive the error only if you entered the number incorrectly. Make sure that you chosen the correct country +888.

levlam avatar Aug 13 '24 22:08 levlam

I'm using the number as +888 0513 XXYY and the number is correct (hence it's able to login via telegram app) but tdlib is still saying it's incorrect

ne0c0de avatar Aug 13 '24 22:08 ne0c0de

What error do you receive?

levlam avatar Aug 14 '24 02:08 levlam

@ne0c0de it happens when receive login code is disabled on fragment.com website. so make sure it is enabled here. fragment.com > my numbers > get login code

IRGC avatar Aug 14 '24 06:08 IRGC

What error do you receive?

when Telegram asks for phone number and I entered it Telegram says that Invalid phone number

ne0c0de avatar Aug 14 '24 10:08 ne0c0de

TDLib can't say "Invalid phone number".

levlam avatar Aug 14 '24 12:08 levlam

I'm using nodejs wrapper for tdlib (https://github.com/Bannerets/tdl) and thios is the error when I entered the phone number, so you say that library checkl the phone number (I guess it's because country code) and giving that error?

ne0c0de avatar Aug 14 '24 12:08 ne0c0de

TDLib doesn't check phone number. It can't return the error. And the server can't return the error with text "Invalid phone number" either.

levlam avatar Aug 14 '24 12:08 levlam

TDLib doesn't check phone number. It can't return the error. And the server can't return the error with text "Invalid phone number" either.

is there any error case for PHONE_NUMBER_INVALID ?

I asked same question on tdl repo and the developer said that if tdl get that error code then it gives output as Invalid phone number: https://github.com/Bannerets/tdl/issues/171

ne0c0de avatar Aug 14 '24 14:08 ne0c0de

TDLib doesn't check phone number. It can't return the error. And the server can't return the error with text "Invalid phone number" either.

tdl has a simple (optional) login wrapper that prints Invalid phone number in case PHONE_NUMBER_INVALID is received from TDLib.

eilvelia avatar Aug 14 '24 14:08 eilvelia

@ne0c0de As @IRGC explained, you must check that login codes aren't disabled on the fragment.com site for the phone number.

levlam avatar Aug 18 '24 08:08 levlam