Jump to content
McKay Development

Technical-Know-How


Demby

Recommended Posts

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

Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

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

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.

Guest
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.

Loading...
×
×
  • Create New...