ca1f Posted February 15 Report Posted February 15 Hi, is it possible to access Steam Web API resources which require authentication through the API key with an active node-steam-user session that was established and authenticated through username and password? I'm talking about the resource https://api.steampowered.com/ISteamUser/GetPlayerBans/v1/ as one example but it seems there are more API endpoints that require an API key and I would like to avoid the manual process of setting up an API key for the sake of automation since I already am at a point where I successfully log in to the steam network through the wonderful node-steam-user package. Quote
Dr. McKay Posted February 15 Report Posted February 15 Not really. Some WebAPI methods allow you to use an access token (which is the same as a steamLoginSecure cookie without the SteamID prefix), but not all. GetPlayerBans is not an API method that accepts an access token, so you do need an API key for that. Quote
ca1f Posted February 15 Author Report Posted February 15 I take it then it's also not possible to fetch the Steam Web API Key via a connection to the Steam network through node-steam-user, node-steam-user or node-steam-session either, right? It seems like I'm out of luck in this case then. Thanks for the quick response though. Quote
Dr. McKay Posted February 15 Report Posted February 15 No, you'd have to register one using the web page at https://steamcommunity.com/dev/apikey or node-steamcommunity's createWebApiKey method. If you're calling methods that aren't account-specific (e.g. GetPlayerBans returns the same data for everyone, nothing is specific to your account) then you could register one API key and use it for everything, but I don't know if that meets your specific needs. Quote
ca1f Posted February 16 Author Report Posted February 16 The function family of getWebApiKey and createWebApiKey provided by note-steamcommunity seems to be good enough to me. Thanks for pointing that one out. 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.