0xDocs 0x.limo

Docs / REST API

Friends and presence

Friends, nicknames and groups, what a player is playing, rich presence, game invites, in-game chat, following, clans and clan chat.

The social API follows ISteamFriends. Changes reach the other side over the push stream as events: persona_change, rich_presence, game_invite, friend_message, clan_chat_msg and others.

#The social view

GET /v1/me/social returns everything a friends list needs in one call:

json
{"friends": [{"steamid": "76561197960287931", "relationship": 3, "persona_name": "bob", "level": 4,
              "nickname": null, "online": true, "playing": {"appid": 480}}],
 "nicknames": [], "groups": [{"id": 12, "name": "Raid team", "members": ["76561197960287931"]}],
 "clans": [{"id": 5, "name": "Night Owls", "tag": "OWL", "public": true, "official_appid": null, "role": "member", "owner": "76561197960287940"}]}
bashtested
curl -s https://api.0x.limo/v1/me/social -H "Authorization: Bearer $ZEROX_TOKEN"

relationship is Steam's EFriendRelationship, for example 3 = friend, 2 = request received, 4 = request sent, 1 = blocked.

#Friends

RouteDoes
POST /v1/me/friends {username}send a friend request by username (case-insensitive)
POST /v1/friends/{steamid} {action}add, accept, remove, ignore, block or unblock → {relationship}
PUT /v1/friends/{steamid}/nickname {nickname}your nickname for someone (≤ 32 characters; empty clears it)
POST /v1/me/friend-groups {name} / DELETE .../{id}friend groups
PUT / DELETE /v1/me/friend-groups/{id}/members/{steamid}group membership
PUT /v1/me/persona {persona_name}change your display name (1 to 32 characters; the old one goes to the history)
GET /v1/users/{steamid}/profilepublic profile {steamid, persona_name, level}
GET /v1/users/{steamid}/persona-historyearlier display names
PUT / DELETE /v1/me/following/{steamid}, GET /v1/me/followingfollow players
POST /v1/me/coplay {steamid, appid}record someone you played with

#Playing and rich presence

  • PUT /v1/me/playing {appid, ip?, port?, query_port?, lobby?} says what the player is playing now. Refresh it each minute; it expires after 3 minutes. DELETE /v1/me/playing says the player stopped. The launcher does this for games it starts.
  • PUT /v1/apps/{appid}/presence stores the player's rich presence key/values for the app (kept a day). Friends get rich_presence events.
  • GET /v1/users/{steamid}/presence?app= returns a friend's rich presence {appid, visible, data} (without app: the game they play now). Strangers get visible: false.
bash
curl -s -X PUT https://api.0x.limo/v1/apps/480/presence -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' -d '{"status": "In a match: 3-2", "connect": "+connect 10.0.0.5:27015"}'

#Invites and chat

RouteDoes
POST /v1/friends/{steamid}/invite {connect, appid}invite a friend to your game; they get game_invite
POST /v1/friends/{steamid}/messages {body, kind}an in-game chat message (kind: EChatEntryType) → {id}
GET /v1/messages/{id}a message you sent, received or can see as a clan member (30 days)

#Clans

RouteDoes
POST /v1/clans {name, tag, public}create a clan you own
GET /v1/clans/{id}{id, name, tag, owner, public, officers, members, online, in_game, chatting}
POST /v1/clans/{id}/join / .../leavejoin a public clan / leave
PUT /v1/clans/{id}/members/{steamid} {role}owner: officer or member
POST /v1/clans/{id}/chat/join / .../leaveenter or leave the clan chat room
GET /v1/clans/{id}/chat/memberswho is in the room
POST /v1/clans/{id}/chat/messages {body}say something in the room

Game servers can check clan membership (GET /v1/gameservers/group_status/{user}/{clan}) and associate with a clan (PUT /v1/gameservers/me/clan).

See the generated me reference and users reference.