Test Accounts PHONE_CODE_INVALID
I used the provided Example and only made the following modifications:
- apiId
- apiHash
- request.useTestDc = true;
Then use the test account
I would like to ask what is the test account code?
I also experienced this, I thought I was stupid
@levlam when will this be fixed?
because if you use a new account it will be banned automatically
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" }
`
Same issue here. On test dc 2.
It's been a long time, has anyone fixed it? I tried it earlier, it's still the same
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.
still experiencing this issue as well.
@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!
The same problem, please fix...
Is the test DC environment still supported?
can we bump this issue, i cant get any test phone register as per the documentation without getting a phone code invalid error
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?
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.
@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.
still experiencing this issue, impossible to test application without risking getting banned
Looks like, this is a core issue. Android Telegram Beta, similar behavior with test backend.
still having this issue
it is quite strange that it is impossible to properly test bots and apps for 3 months already and there are still no response from Telegram developers.
test phone numbers are disabled because of abusing, forget about them, they will never be enabled again
That doesn't make sense. The idea of a test server is, that it doesn't send messages to real users.
You can test with a real phone number on a test DC. The problem is you can't use test accounts. And it prevents from submitting any app that uses Telegram API to Google Play. Since Play review needs test accounts. This completely negates the point of Telegram being open source. You effectively can't publish any Telegram clones on Google Play.