How do I send a request for the ‘log out from all devices’ button?
How do I send a request for the ‘log out from all devices’ button?
await fetch("https://store.steampowered.com/twofactor/manage_action", {
"credentials": "include",
"referrer": "https://store.steampowered.com/twofactor/manage",
"body": "action=deauthorize&sessionid=" + YOUR_BROWSER_SESSIONID,
"method": "POST",
"mode": "cors"
});
If this helped you in any way, please consider contributing to the wiki. It can be about this, or something else. Happy Holidays!
Bro, I've been learning python for two months. Help please, I tried to make this command through queries but it doesn't work (after authorisation I see my login in devices), however I don't get kicked out.
`from steampy.client import SteamClient import requests
API_KEY = 'my api' USERNAME = 'login' PASSWORD = 'pass' SHARED_SECRET = 'name_of_maf😁.maFile'
def main(): client = SteamClient(API_KEY) client.login(USERNAME, PASSWORD, SHARED_SECRET)
# Получаем все куки из внутренней сессии
cookies_dict = client._session.cookies.get_dict()
# Извлекаем sessionid
sessionid = cookies_dict.get('sessionid')
print("sessionid:", sessionid)
url = "https://store.steampowered.com/twofactor/manage_action"
headers = {
"Referer": "https://store.steampowered.com/twofactor/manage"
}
data = {
"action": "deauthorize",
"sessionid": sessionid
}
response = requests.post(url, headers=headers, data=data)
if response.status_code == 200:
print("Деавторизация успешна")
else:
print(f"Ошибка: {response.status_code}")
if name == 'main': main()`
Requests are really really hard 😥
You need to be logged in the steam web
You need to be logged in the steam web
I realise this and I do successfully log in via ‘steampy’, I also get the sessionid via it, however my request does not kick out of the session
I think you may need to add Content-Type: application/x-www-form-urlencoded header. My bad for removing the headers.
application/x-www-form-urlencoded
it didn't work 😥
I think you may need to add
Content-Type: application/x-www-form-urlencodedheader. My bad for removing the headers.
Maybe you know some other way? This is very important to me 😥
I think you may need to add
Content-Type: application/x-www-form-urlencodedheader. My bad for removing the headers.Maybe you know some other way? This is very important to me 😥
All I can tell you the request for
is the following:
await fetch("https://store.steampowered.com/twofactor/manage_action", {
"credentials": "include",
"headers": {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
"Content-Type": "application/x-www-form-urlencoded",
"Sec-GPC": "1",
"Upgrade-Insecure-Requests": "1",
"Sec-Fetch-Dest": "document",
"Sec-Fetch-Mode": "navigate",
"Sec-Fetch-Site": "same-origin",
"Sec-Fetch-User": "?1",
"Priority": "u=0, i",
"Pragma": "no-cache",
"Cache-Control": "no-cache"
},
"referrer": "https://store.steampowered.com/twofactor/manage",
"body": "action=deauthorize&sessionid=xxxx",
"method": "POST",
"mode": "cors"
});
I can't help you more than that