Notes
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Obtain the current user's PresenceRecord without having to know the user's XUID.
The domain for these URIs is userpresence.xboxlive.com
.
- Query string parameters
- Authorization
- Required Request Headers
- Optional Request Headers
- Request body
- Response body
Query string parameters
Parameter | Type | Description |
---|---|---|
level | string | Optional.
|
Authorization
Type | Required | Description | Response if missing |
---|---|---|---|
XUID | Yes | Xbox User ID (XUID) of the caller | 403 Forbidden |
Required Request Headers
Header | Type | Description |
---|---|---|
Authorization | string | Authentication credentials for HTTP authentication. Example value: "XBL3.0 x=<userhash>;<token>". |
x-xbl-contract-version | string | Build name/number of the Xbox LIVE service to which this request should be directed. The request will only be routed to that service after verifying the validity of the header, the claims in the auth token, and so on. Example values: 3, vnext. |
Accept | string | Content-Types that are acceptable. The only one supported by Presence is application/json, but it must be specified in the header. |
Accept-Language | string | Acceptable locale for strings in the response. Example values: en-US. |
Host | string | Domain name of the server. Example value: presencebeta.xboxlive.com. |
Optional Request Headers
Header | Type | Description |
---|---|---|
X-RequestedServiceVersion | Build name/number of the Xbox LIVE service to which this request should be directed. The request will only be routed to that service after verifying the validity of the header, the claims in the auth token, and so on. Default value: 1. |
Request body
No objects are sent in the body of this request.
Response body
Sample response
This method returns a PresenceRecord.
{
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",
}
}]
}]
}