td icon indicating copy to clipboard operation
td copied to clipboard

Test Accounts PHONE_CODE_INVALID

Open smagical opened this issue 1 year ago • 21 comments

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?

smagical avatar Oct 11 '24 13:10 smagical

I also experienced this, I thought I was stupid

azkadev avatar Oct 17 '24 15:10 azkadev

@levlam when will this be fixed?

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

azkadev avatar Oct 17 '24 15:10 azkadev

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" }

`

claudionieder avatar Oct 24 '24 00:10 claudionieder

Same issue here. On test dc 2.

rufatagayev avatar Oct 24 '24 05:10 rufatagayev

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

azkadev avatar Oct 29 '24 05:10 azkadev

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.

bon3o avatar Nov 13 '24 21:11 bon3o

still experiencing this issue as well.

rose4096 avatar Nov 20 '24 20:11 rose4096

@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!

ernado avatar Nov 28 '24 13:11 ernado

The same problem, please fix...

borzovplus avatar Nov 28 '24 14:11 borzovplus

Is the test DC environment still supported?

Patrickdlg avatar Dec 17 '24 06:12 Patrickdlg

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

77abe77 avatar Dec 23 '24 06:12 77abe77

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?

vladlenskiy avatar Dec 30 '24 12:12 vladlenskiy

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 avatar Jan 01 '25 15:01 ernado

@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.

rufatagayev avatar Jan 01 '25 16:01 rufatagayev

still experiencing this issue, impossible to test application without risking getting banned

ilya-ssh avatar Jan 07 '25 16:01 ilya-ssh

Looks like, this is a core issue. Android Telegram Beta, similar behavior with test backend.

Zausenec avatar Jan 11 '25 09:01 Zausenec

still having this issue

DucaRii avatar Jan 13 '25 19:01 DucaRii

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.

siviae avatar Jan 24 '25 21:01 siviae

test phone numbers are disabled because of abusing, forget about them, they will never be enabled again

strokegmd avatar Jan 31 '25 18:01 strokegmd

That doesn't make sense. The idea of a test server is, that it doesn't send messages to real users.

claudionieder avatar Feb 01 '25 03:02 claudionieder

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.

rufatagayev avatar Feb 01 '25 04:02 rufatagayev