Teilen über


GET (/users/{ownerId}/people)

Gets caller's people collection. The domain for these URIs is social.xboxlive.com.

Remarks

GET operations won't modify any resources so this will produce the same results if executed once or multiple times.

URI parameters

Parameter Type Description
ownerId string Identifier of the user whose resource is being accessed. Must match the authenticated user. The possible values are "me", xuid({xuid}), or gt({gamertag}).

Query string parameters

Parameter Type Description
view string Return the people associated with a view. The default value is "all". The possible values are:
  • All - Returns all People on the user's People list. This is the default value.
  • Favorite - Returns all People on the user's People list who have the Favorite attribute.
  • LegacyXboxLiveFriends - Returns all People on the user's People list who are also legacy Xbox LIVE friends.

  • Note: Only the All value is supported if the calling user is different than the owning user.
startIndex 32-bit unsigned integer Return the items starting at the given index.
maxItems 32-bit unsigned integer Maximum number of people to return from the collection starting from the start index. The service may provide a default value if maxItems is not present and may return fewer than maxItems (even if the last page of results has not yet been returned).

Authorization

Type Required Description Response if missing
XUID yes Caller has user's Xbox User ID (XUID). 401 Unauthorized

Required Request Headers

Header Description
Authorization String. Authorization data for Xbox LIVE. This is typically an encrypted XSTS token. Example value: XBL3.0 x=<userhash>;<token>.

Optional Request Headers

Header 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, etc. Default value: 1.
Accept String. Content-Types that the caller accepts in the response. All responses are application/json.

Request body

No objects are sent in the body of this request.

HTTP status codes

The service returns one of the status codes in this section in response to a request made with this method on this resource. For a complete list of standard HTTP status codes used with Xbox Live Services, see Standard HTTP status codes.

Code Reason phrase Description
200 OK Success.
400 Bad Request Query parameters or user IDs were malformed.
403 Forbidden XUID claim could not be parsed from the authorization header.

Required Response Headers

Header Type Description
Content-Length 32-bit unsigned integer Length, in bytes, of the response body. Example value: 22.
Content-Type string MIME type of the response body. This will always be application/json.

Response body

If the call is successful, the service returns the total number of people in the caller's people collection, and an array containing the caller's people collection. See PeopleList (JSON).

Sample response

{
    "people": [
        {
            "xuid": "2603643534573573",
            "isFavorite": true,
            "isFollowingCaller": false,
            "socialNetworks": ["LegacyXboxLive"]
        },
        {
            "xuid": "2603643534573572",
            "isFavorite": true,
            "isFollowingCaller": false,
            "socialNetworks": ["LegacyXboxLive"]
        },
        {
            "xuid": "2603643534573577",
            "isFollowingCaller": false,
            "isFavorite": false
        },
    ],
    "totalCount": 3
}

See also

Parent

/users/{ownerId}/people