Steam's protocol in Go to allow automation of different actions on the Steam network without running an actual Steam client. Includes APIs for friends, chatting, trading, trade offers and TF2 crafting.
Go C#
Switch branches/tags
Nothing to show
Clone or download
Philipp15b Merge pull request #80 from looterz/authfix
Fixed gsbot authentication not working when steamguard is enabled.
Latest commit e0f3bb9 Oct 20, 2016
Permalink
Failed to load latest commit information.
community Add support for steamLoginSecure cookie, required by new trade API, a… Feb 12, 2015
cryptoutil Minor cryptoutil improvements Aug 3, 2014
dota/protocol/protobuf Added dota proto files and updated generator.go Jan 25, 2016
economy/inventory More work on tradeoffer and inventory Dec 18, 2015
generator Go fmt for generator.go Feb 2, 2016
gsbot Added TwoFactorCode to LogOnDetails Apr 28, 2016
jsont Add full support for Steam Trading Jul 15, 2014
netutil Move other things into new netutil package Jul 18, 2014
protocol Protocol: Add String() method to JobId Jan 20, 2016
rwu Move reading and writing utilities to a separate package Aug 27, 2014
socialcache Renamed module "internal" and "tf2/internal" to "protocol" Jan 7, 2016
steamid SteamId: NewId now returns an error instead of logging Aug 13, 2014
tf2 Commented out three undefined methods used in auth.go Jan 7, 2016
trade fix docs Feb 16, 2016
tradeoffer Add non-friends err to parseEscrowDuration Jan 6, 2016
.gitignore Added golang .gitignore Aug 12, 2014
.gitmodules First commit Oct 3, 2013
LICENSE.txt Bump year in LICENSE.txt Jul 3, 2014
README.md Some documentation Jan 20, 2016
auth.go Deleted obsolete fields from AccountInfoEvent (no longer sent by Steam). Jan 8, 2016
auth_events.go Deleted obsolete fields from AccountInfoEvent (no longer sent by Steam). Jan 8, 2016
client.go Update server list with data from the Steam directory. Jan 20, 2016
client_events.go Moved events to their own files Aug 12, 2014
connection.go Client/Connect: deduplicate code Jan 20, 2016
doc.go Some documentation Jan 20, 2016
gamecoordinator.go Renamed module "internal" and "tf2/internal" to "protocol" Jan 7, 2016
keys.go Renamed module "internal" and "tf2/internal" to "protocol" Jan 7, 2016
notifications.go Renamed module "internal" and "tf2/internal" to "protocol" Jan 7, 2016
notifications_events.go Moved events to their own files Aug 12, 2014
servers.go Update server list with data from the Steam directory. Jan 20, 2016
social.go Merge pull request #70 from softashell/RequestOfflineMessages Jan 11, 2016
social_events.go Use time.Time for message timestamps Jan 10, 2016
steam_directory.go Fix function descriptions Nov 5, 2015
trading.go Renamed module "internal" and "tf2/internal" to "protocol" Jan 7, 2016
trading_events.go Renamed module "internal" and "tf2/internal" to "protocol" Jan 7, 2016
web.go Renamed module "internal" and "tf2/internal" to "protocol" Jan 7, 2016
web_events.go Add WebLogOnErrorEvent Nov 5, 2015

README.md

Steam for Go

This library implements Steam's protocol to allow automation of different actions on Steam without running an actual Steam client. It is based on SteamKit2, a .NET library.

In addition, it contains APIs to Steam Community features, like trade offers and inventories.

Some of the currently implemented features:

  • Trading and trade offers, including inventories and notifications
  • Friend and group management
  • Chatting with friends
  • Persona states (online, offline, looking to trade, etc.)
  • SteamGuard with two-factor authentication
  • Team Fortress 2: Crafting, moving, naming and deleting items

If this is useful to you, there's also the go-steamapi package that wraps some of the official Steam Web API's types.

Installation

go get github.com/Philipp15b/go-steam

Usage

You can view the documentation with the godoc tool or online on godoc.org.

You should also take a look at the following sub-packages:

Working with go-steam

Whether you want to develop your own Steam bot or directly work on go-steam itself, there are are few things to know.

  • If something is not working, check first if the same operation works (under the same conditions!) in the Steam client on that account. Maybe there's something go-steam doesn't handle correctly or you're missing a warning that's not obviously shown in go-steam. This is particularly important when working with trading since there are restrictions, for example newly authorized devices will not be able to trade for seven days.
  • Since Steam does not maintain a public API for most of the things go-steam implements, you can expect that sometimes things break randomly. Especially the trade and tradeoffer packages have been affected in the past.
  • Always gather as much information as possible. When you file an issue, be as precise and complete as you can. This makes debugging way easier.
  • If you haven't noticed yet, expect to find lots of things out yourself. Debugging can be complicated and Steam's internals are too.
  • Sometimes things break and other SteamKit ports are fixed already. Maybe take a look what people are saying over there? There's also the SteamKit IRC channel.

Updating go-steam to a new SteamKit version

To update go-steam to a new version of SteamKit, do the following:

go get github.com/golang/protobuf/protoc-gen-go/
git submodule init && git submodule update
cd generator
go run generator.go clean proto steamlang

Make sure that $GOPATH/bin / protoc-gen-go is in your $PATH. You'll also need protoc, the protocol buffer compiler. At the moment, we use Protocol Buffers 2.6.1 with proco-gen-go-2402d76.

To compile the Steam Language files, you also need the .NET Framework on Windows or mono on other operating systems.

Apply the protocol changes where necessary.

License

Steam for Go is licensed under the New BSD License. More information can be found in LICENSE.txt.