Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Commit a773091

Browse files
committed
fix log in
1 parent c55167b commit a773091

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

MaxBridge/max_api.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,15 +360,19 @@ def send_vertify_code(self, phone_number: str):
360360
"type": "START_AUTH",
361361
"language": "ru"
362362
}
363-
return self.send_command(self.OPCODE_MAP['SEND_VERTIFY_CODE'], payload)
363+
res = self.send_command(self.OPCODE_MAP['SEND_VERTIFY_CODE'], payload)
364+
self.token = res['token']
365+
return res
364366

365367
def check_vertify_code(self, code: int):
366368
payload = {
367369
"token": self.token,
368370
"verifyCode": code,
369371
"authTokenType": "CHECK_CODE"
370372
}
371-
return self.send_command(self.OPCODE_MAP['CHECK_VERTIFY_CODE'], payload)
373+
res = self.send_command(self.OPCODE_MAP['CHECK_VERTIFY_CODE'], payload)
374+
self.token = res['token']
375+
return res
372376

373377
def send_generic_command(self, command_name: str, payload: dict, wait_for_response: bool = True, timeout: int = 10):
374378
command_name_upper = command_name.upper()

0 commit comments

Comments
 (0)