Demby Posted June 29, 2017 Report Posted June 29, 2017 Hi Doc, I'm just really curious, with the scarcity of proper documents on how to use the Steam API here's some general questions I got. 1. From scratch how do you build the login through steam? I know the implementation of logging in through steam using the site, but how do you do it programatically?2. How do you listen for trade offers? Does steam have websockets that will send to your account? Thanks alot Quote
Dr. McKay Posted June 29, 2017 Report Posted June 29, 2017 For #1, do you want to log users into your site using their Steam accounts, or do you want to login to Steam using a bot? For #2, you can use steam-tradeoffer-manager. At a low level, it's just polling requests to an API endpoint. Quote
Demby Posted July 3, 2017 Author Report Posted July 3, 2017 For #1 : I'd like to know both please. Did you hack some methods together in order not to login through steam? (I understood logging through the site is the only way)For #2: Ok I get it.. Thanks. But how many times does it poll? Doesn't steam have a limit on that? Quote
Dr. McKay Posted July 3, 2017 Report Posted July 3, 2017 1. For authenticating users through Steam's OpenID provider, you can use the attached PHP class. I don't know where it originally came from, but it works well (although it could benefit from being updated to use curl instead of file_get_contents). This particular version of it was edited by me to authenticate the return domain, otherwise you could be vulnerable to spoof attacks. For logging in a bot to Steam, you can use steam-user or steamcommunity. Or if you really want to, you can look at the source of those to see what they do to implement it yourself. 2. It polls however frequently you tell it to. The rate-limit on the API domain is much higher than on the community domain. You can reasonably safely poll every 1-2 seconds, although for sake of being a good citizen, you probably don't want to do that.SteamSignIn.php Demby 1 Quote
Demby Posted July 5, 2017 Author Report Posted July 5, 2017 (edited) Closed question. Edited July 9, 2017 by Demby 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.