xtrime-ru / TelegramApiServer

Fast, simple, async php telegram api server: MadelineProto + Amp HTTP Server
https://tg.i-c-a.su
MIT License
562 stars 124 forks source link

complete2falogin return false #104

Closed jaynlive closed 2 years ago

jaynlive commented 2 years ago

request complete2falogin return false. my password is right. but return false.

http://127.0.0.1:9503/api/session/complete2falogin?password=pwd123

return

{
    "success": false,
    "errors": [
        {
            "exception": "danog\\MadelineProto\\RPCErrorException",
            "message": "PASSWORD_HASH_INVALID",
            "file": "\/www\/wwwroot\/TelegramApiServer-master\/vendor\/danog\/madelineproto\/src\/danog\/MadelineProto\/MTProtoSession\/ResponseHandler.php",
            "line": 394,
            "code": 400,
            "backtrace": [
                {
                    "file": "\/www\/wwwroot\/TelegramApiServer-master\/vendor\/danog\/madelineproto\/src\/danog\/MadelineProto\/MTProtoSession\/ResponseHandler.php",
                    "line": 194,
                    "function": "handleRpcError",
                    "class": "danog\\MadelineProto\\Connection",
                    "type": "->"
                },
                {
                    "file": "\/www\/wwwroot\/TelegramApiServer-master\/vendor\/danog\/madelineproto\/src\/danog\/MadelineProto\/MTProtoSession\/ResponseHandler.php",
                    "line": 73,
                    "function": "handleResponse",
                    "class": "danog\\MadelineProto\\Connection",
                    "type": "->"
                },
                {
                    "file": "\/www\/wwwroot\/TelegramApiServer-master\/vendor\/amphp\/amp\/lib\/Loop\/Driver.php",
                    "line": 119,
                    "function": "handleMessages",
                    "class": "danog\\MadelineProto\\Connection",
                    "type": "->"
                }
            ]
        }
    ],
    "response": null
}
xtrime-ru commented 2 years ago

Request looks correct. Probably you missed some steps.

jaynlive commented 2 years ago

Reference in ne but i have request

http://127.0.0.1:9503/api/session/phoneLogin?phone=%2B7123

and

http://127.0.0.1:9503/api/session/completePhoneLogin?code=123456

before request complete2falogin. and them all return right.

but complete2falogin return false. i don't know missed which step.