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

Test Accounts PHONE_CODE_INVALID #3083

Open
smagical opened this issue Oct 11, 2024 · 15 comments
Open

Test Accounts PHONE_CODE_INVALID #3083

smagical opened this issue Oct 11, 2024 · 15 comments

Comments

@smagical
Copy link

smagical commented Oct 11, 2024

I used the provided Example and only made the following modifications:

  1. apiId
  2. apiHash
  3. request.useTestDc = true;
    Then use the test account
    95cfc293b7c0402fc764329358c28eef

I would like to ask what is the test account code?

@azkadev
Copy link

azkadev commented Oct 17, 2024

I also experienced this, I thought I was stupid

@azkadev
Copy link

azkadev commented Oct 17, 2024

@levlam
when will this be fixed?

because if you use a new account it will be banned automatically

@Scutua
Copy link

Scutua commented Oct 17, 2024 via email

@claudionieder
Copy link

I see the issue too.
`
% ./tg_cli --test --api-id=94575 --api-hash=a3406de8d171bb422bb6ddf3bbd800e2 -v 1
[ 1][t 1][1729729075.190335988][cli.cpp:1465][!Td] Receive result [1][id=1] Ok {
}
[ 1][t 1][1729729075.190428018][cli.cpp:1465][!Td] Receive result [1][id=2] Ok {
}
td_cli> sap +9996621234
[ 1][t 1][1729729080.874551057][cli.cpp:1465][!Td] Receive result [1][id=3] Ok {
}
td_cli> cac 22222
[ 1][t 1][1729729086.659242153][cli.cpp:1611][!Td] Receive error [1][id=4] Error {
code = 400
message = "PHONE_CODE_INVALID"
}

`

@rufatagayev
Copy link

Same issue here. On test dc 2.

@azkadev
Copy link

azkadev commented Oct 29, 2024

It's been a long time, has anyone fixed it?
I tried it earlier, it's still the same

@bon3o
Copy link

bon3o commented Nov 13, 2024

Also have the same issue. While the test api isn't working spent 3 accounts being banned testing on production(I know it is not recommended to test on production, but had no other option). It would be nice to notice developers through docs about
non-working test environment. Although, why am I surprised? Feedback is not held in high esteem by both support and developers of Telegram.

@rose4096
Copy link

still experiencing this issue as well.

@ernado
Copy link

ernado commented Nov 28, 2024

@levlam PTAL, gentle ping.

Can't perform automated QA without test accounts, pretty critical issue.
I fully rely on it to make 100% sure my libraries work correctly.

Please fix it, really need it!

@borzovplus
Copy link

The same problem, please fix...

@Patrickdlg
Copy link

Is the test DC environment still supported?

@77abe77
Copy link

77abe77 commented Dec 23, 2024

can we bump this issue, i cant get any test phone register as per the documentation without getting a phone code invalid error

@vladlenskiy
Copy link

I also encountered this problem, what options do we have? If I use a real account, the system logs me out of all devices after successful authorization using TdLib. I recently started digging into this, maybe I don’t understand how to test authorization correctly?

@ernado
Copy link

ernado commented Jan 1, 2025

I’ve “solved” this problem by creating a system that manages multiple real accounts on test server and provides them as a service that handles login codes and sends them to client. Something like 4-5 accounts was enough for my end-to-end tests.
They should be in each other contact list for Telegram not to flood wait them if chats are tested.
Basically it is “test accounts as a service” for using in tests.

One account was banned on test server almost immediately which is hilarious.

@rufatagayev
Copy link

@ernado How can this be used to provide app access for Google Play Store app submission/review? Reviewers still have to have access to the phone number/Tg account and be able to receive OTPs.

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