researcher Posted December 16, 2024 Report Posted December 16, 2024 Hello, is there any way I can login with refresh token with Steam Web API-s? I found how to log in with account name, password and guard code here https://steamwebapi.azurewebsites.net/, but I can't see how can I log in with refresh token alone. I now that steam-user does this with Steam network, but I'm interested in Steam Web solution. Thanks. Quote
Dr. McKay Posted December 18, 2024 Report Posted December 18, 2024 You can do this with steam-session. Quote
researcher Posted December 19, 2024 Author Report Posted December 19, 2024 Thanks for the reference. I want to do it with the simple http request and came to this: fetch( 'https://api.steampowered.com/IAuthenticationService/GenerateAccessTokenForApp/v1/', { method: 'POST', headers: { "Content-Type": "application/x-www-form-urlencoded", }, body: new URLSearchParams({ refresh_token: refreshToken, steamid: id, }).toString() } ) refreshToken variable holds normal refresh token, like the one received in steam-user 'refreshToken' event. id variable holds 64-bit Steam ID. But I'm getting empty result: {"response":{}} And in the header I'm getting 'x-eresult': '63' when I call fetch for the first time, but 'x-eresult': '15' when I call it for the second time (with the same refresh token). Thanks. Quote
Dr. McKay Posted December 20, 2024 Report Posted December 20, 2024 I don't really have the time or capacity to do one-on-one coaching for reimplementing the Steam protocols yourself. I'd suggest checking the existing code and trying to copy it as exactly as possible. Quote
researcher Posted January 5 Author Report Posted January 5 Sorry to bother you, but my question is related to exactly this one endpoint, not the whole Steam protocol. I checked github and copied exactly the same, and among those that work I could not find any that uses query parameters, they are all based on protocol buffers. I was able to figure out how to create the entire authentication flow based on guard code (with query parameters). But this one endpoint looks problematic. Happy new year. Thanks. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.