Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid phone number error on fragment numbers #3022

Open
ne0c0de opened this issue Aug 13, 2024 · 11 comments
Open

Invalid phone number error on fragment numbers #3022

ne0c0de opened this issue Aug 13, 2024 · 11 comments

Comments

@ne0c0de
Copy link

ne0c0de commented Aug 13, 2024

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?

@levlam
Copy link
Contributor

levlam commented Aug 13, 2024

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

@ne0c0de
Copy link
Author

ne0c0de commented Aug 13, 2024

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

@levlam
Copy link
Contributor

levlam commented Aug 14, 2024

What error do you receive?

@IRGC
Copy link

IRGC commented Aug 14, 2024

@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

@ne0c0de
Copy link
Author

ne0c0de commented Aug 14, 2024

What error do you receive?

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

@levlam
Copy link
Contributor

levlam commented Aug 14, 2024

TDLib can't say "Invalid phone number".

@ne0c0de
Copy link
Author

ne0c0de commented Aug 14, 2024

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?

@levlam
Copy link
Contributor

levlam commented Aug 14, 2024

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.

@ne0c0de
Copy link
Author

ne0c0de commented Aug 14, 2024

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: eilvelia/tdl#171

@eilvelia
Copy link
Contributor

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.

@levlam
Copy link
Contributor

levlam commented Aug 18, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@ne0c0de @eilvelia @levlam @IRGC and others