Compartilhar via


PresenceRecord (JSON)

Data about the online presence of a single user.

PresenceRecord

The PresenceRecord object has the following specification.

Member Type Description
xuid string The Xbox User ID (XUID) of the target user. The presence data provided is for this user.
devices array of DeviceRecord List of the user's device records.
state string User's activity on Xbox LIVE. Possible values:
  • Online: User has at least one device record.
  • Away: User is signed into Xbox LIVE but not active in any title.
  • Offline: User is not present on any device.
lastSeen LastSeenRecord The last seen information is only available when the user has no valid DeviceRecords. If the object was removed from the cache, its data might not be returned, because there is no persistent store.

Sample JSON syntax

{
  xuid:"0123456789",
  state:"online",
  devices:
  [{
    type:"D",
    titles:
    [{
      id:"12341234",
      name:"Contoso 5",
      state:"active",
      placement:"fill",
      timestamp:"2012-09-17T07:15:23.4930000",
      activity:
      {
        richPresence:"Team Deathmatch on Nirvana"
      }
    },
    {
      id:"12341235",
      name:"Contoso Waypoint",
      timestamp:"2012-09-17T07:15:23.4930000",
      placement:"snapped",
      state:"active",
      activity:
      {
        richPresence:"Using radar"
      }
    }]
  },
  {
    type:"W8",
    titles:
    [{
      id:"23452345",
      name:"Contoso Gamehelp",
      state:"active",
      placement:"full",
      timestamp:"2012-09-17T07:15:23.4930000",
      activity:
      {
        richPresence:"Nirvana page"
      }
    }]
  }]
}

See also

Parent

JavaScript Object Notation (JSON) Object Reference

Reference

POST (/users/batch)

GET (/users/me)

DELETE (/users/xuid({xuid})/devices/current/titles/current)

GET (/users/xuid({xuid}))