Jump to content
McKay Development

Can I access Steam Web API resources with a node-steam-user session?


Recommended Posts


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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...