Is it safe to use my Steam Web API key in an addon release?
12 replies, posted
I'm working on an addon that needs to check user profile when they join a server.
Obviously, I have to use my Web API key to do this.
Is it safe to retrieve the information with my key? Or how should I go about doing this?
I don't know the full risks of doing so, but you could easily just ask people to go get their own key as a part of the installation process. Or maybe if it's for the workshop, give admins a console command to input a new API key that gets saved to a .txt on the server in the data folder.
[editline]22nd June 2016[/editline]
what do you want to check the profiles for?
they only use the api keys to track who is using what api when
[QUOTE=rtm516;50566001]they only use the api keys to track who is using what api when[/QUOTE]
you wouldn't want Valve to be mad at you if they thought you were abusing their servers somehow because someone else was with your key
you could also design a php script that u pass the profile id and then it returns the info and has the api key embeded
[QUOTE=rtm516;50566010]you could also design a php script that u pass the profile id and then it returns the info and has the api key embeded[/QUOTE]
yeah but then the addon would require that OP keeps a server around for it forever, and you'd have potentially tons of requests to Valve's API server all at once from your key; could get you banned from something if they thought your key was spamming
[editline]22nd June 2016[/editline]
same risk if you shipped the addon with just your own key
[QUOTE=bitches;50565995]what do you want to check the profiles for?[/QUOTE]
Basically so I can see what that player's primary group is. I'm just fooling around with the API, I'm not really developing anything.
[editline]22nd June 2016[/editline]
[QUOTE=rtm516;50566010]you could also design a php script that u pass the profile id and then it returns the info and has the api key embeded[/QUOTE]
That's what I was thinking. I do own a domain - so it's not like I'd have to purchase one. That's definitely the safest way.
[url=http://steamcommunity.com/id/darkwater124?xml=1]You don't need to use the API for that[/url]
[QUOTE=Darkwater124;50566048][url=http://steamcommunity.com/id/darkwater124?xml=1]You don't need to use the API for that[/url][/QUOTE]
but if you want a json output so its readable by lua you do
[QUOTE=Darkwater124;50566048][url=http://steamcommunity.com/id/darkwater124?xml=1]You don't need to use the API for that[/url][/QUOTE]
Hmm, I see. Thanks!
[editline]22nd June 2016[/editline]
[QUOTE=rtm516;50566059]but if you want a json output so its readable by lua you do[/QUOTE]
Oh yeah, well fuck. Back to that...
[QUOTE=rtm516;50566059]but if you want a json output so its readable by lua you do[/QUOTE]
it isn't hard to parse the html callback for a small specific piece of information like this one
[editline]22nd June 2016[/editline]
[url]http://wiki.garrysmod.com/page/http/Fetch[/url]
[editline]22nd June 2016[/editline]
[url]http://wiki.garrysmod.com/page/Category:string[/url]
[QUOTE=bitches;50566063]it isn't hard to parse the html callback for a small specific piece of information like this one
[editline]22nd June 2016[/editline]
[url]http://wiki.garrysmod.com/page/http/Fetch[/url]
[editline]22nd June 2016[/editline]
[url]http://wiki.garrysmod.com/page/Category:string[/url][/QUOTE]
I'm aware. I guess I'll take that path. Thanks!
[QUOTE=rtm516;50566059]but if you want a json output so its readable by lua you do[/QUOTE]
[url=http://lua-users.org/wiki/LuaXml]You can parse XML just as fine.[/url] (This also isn't the only XML parsing thing)
Sorry, you need to Log In to post a reply to this thread.