bukson / steampy

A Steam trading library for python 3
MIT License
538 stars 149 forks source link

Missing refresh_token in _pool_sessions_steam #380

Open GrinJ opened 3 months ago

GrinJ commented 3 months ago

Hi!

Can you help me please, when I call login() function, got error that refresh_token is missing in the response. So the error originally happens in method _pool_sessions_steam() because in response from Steam I got that:

{"response": {"had_remote_interaction": false}}

Instead of normal one:

{"response": {"refresh_token": "eyA....", "had_remote_interaction": false, "account_name": "mySteamAccount"}}

As I understood this is the response from method https://api.steampowered.com/IAuthenticationService/PollAuthSessionStatus/v1 and without calling it bot can not fully login.

But this happens to me randomly and idk what is the logic of this error, why bot sometime can successfully login, but then I got this error.

Do you now why this happens and how I can avoid it?

luckyway7 commented 3 months ago

I have the same error, this code displays False, I cannot authorize, although I use the code from the documentation

from steampy.client import SteamClient

steam_client = SteamClient('key')
steam_client.login('login', 'pass!', 'guard.json')
print(steam_client.is_session_alive())