> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

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

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

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

別のユーザーまたはクライアントのプレゼンスを取得します。
これらの URI のドメインは `userpresence.xboxlive.com` です。

* [備考](#ID4EV)
* [URI パラメーター](#ID4EDB)
* [クエリ文字列パラメーター](#ID4EOB)
* [認可](#ID4E4C)
* [プライバシー設定がリソースに及ぼす影響](#ID4EAE)
* [必須リクエスト ヘッダー](#ID4EVH)
* [オプションのリクエスト ヘッダー](#ID4E1BAC)
* [リクエスト本文](#ID4E1CAC)
* [レスポンス本文](#ID4EFDAC)

## 備考

利用者がオブジェクト全体に関心がない場合は、[PresenceRecord](https://docs.xbox.com/ja-jp/reference/live/rest/json/json-presencerecord.md) の一部を提供するようにレスポンスをフィルタリングできます。

> **注:**\
> 返されるデータは、プライバシーおよびコンテンツ分離のルールによって制限されます。

## URI パラメーター

\| Parameter| Type| Description|
\| --- | --- | --- | --- |
\| xuid| 64-bit unsigned integer| 対象ユーザーの XBOX User ID (XUID)。|

## クエリ文字列パラメーター

\| Parameter| Type| Description|
\| --- | --- | --- | --- | --- | --- | --- |
\| level| string| オプション。<ul><li>**user**: ユーザー ノードのみを返します。</li><li>**device**: ユーザー ノードとデバイス ノードを返します。</li><li>**title**: 既定値。アクティビティを除くツリー全体を返します。</li><li>**all**: アクティビティ レベルのプレゼンスを含む、ツリー全体を返します。</li></ul> |

## 認可

\| Type| Required| Description| Response if missing|
\| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
\| XUID| Yes| 呼び出し元の XBOX User ID (XUID)| 403 Forbidden|

## プライバシー設定がリソースに及ぼす影響

このメソッドは常に 200 OK を返しますが、レスポンス本文にコンテンツが含まれない場合があります。

\| Requesting User| Target User's Privacy Setting| Behavior|
\| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
\| me| -| 200 OK|
\| friend| everyone| 200 OK|
\| friend| friends only| 200 OK|
\| friend| blocked| 200 OK|
\| non-friend user| everyone| 200 OK|
\| non-friend user| friends only| 200 OK|
\| non-friend user| blocked| 200 OK|
\| third-party site| everyone| 200 OK|
\| third-party site| friends only| 200 OK|
\| third-party site| blocked| 200 OK|

## 必須リクエスト ヘッダー

\| Header| Type| Description|
\| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
\| Authorization| string| HTTP 認証用の認証資格情報。値の例: "XBL3.0 x=\<userhash>;\<token>"。|
\| x-xbl-contract-version| string| リクエストのルーティング先となる XBOX LIVE サービスのビルド名/番号。ヘッダーの有効性、認証トークン内のクレームなどを検証した後にのみ、リクエストはそのサービスにルーティングされます。値の例: 3、vnext。|
\| Accept| string| 受け入れ可能な Content-Type。Presence がサポートするのは application/json のみですが、ヘッダーで指定する必要があります。|
\| Accept-Language| string| レスポンスの文字列に対して受け入れ可能なロケール。値の例: en-US。|
\| Host| string| サーバーのドメイン名。値の例: presencebeta.xboxlive.com。|

## オプションのリクエスト ヘッダー

\| Header| Type| Description|
\| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
\| X-RequestedServiceVersion|  | リクエストのルーティング先となる XBOX LIVE サービスのビルド名/番号。ヘッダーの有効性、認証トークン内のクレームなどを検証した後にのみ、リクエストはそのサービスにルーティングされます。既定値: 1。|

## リクエスト本文

このリクエストの本文にはオブジェクトは送信されません。

## レスポンス本文

### レスポンス例

ユーザーの既存のレコードがない場合、デバイスなしのレコードが返されます。

```json theme={null}
{
  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",
      }
    }]
  }]
}

```

## 関連項目

##### 親

[/users/xuid({xuid})](https://docs.xbox.com/ja-jp/reference/live/rest/uri/presence/uri-usersxuid.md)


## Related topics

- [GET (/users/xuid({xuid})/inbox)](https://docs.xbox.com/ja-jp/reference/live/rest/uri/users/uri-usersxuidinboxget.md)
- [GET (/users/xuid({xuid})/achievements)](https://docs.xbox.com/ja-jp/reference/live/rest/uri/achievements/uri-achievementsusersxuidachievementsgetv2.md)
- [GET (/users/xuid({xuid})/groups/{moniker} )](https://docs.xbox.com/ja-jp/reference/live/rest/uri/presence/uri-usersxuidgroupsmonikerget.md)
- [GET (/users/xuid({xuid})/history/titles)](https://docs.xbox.com/ja-jp/reference/live/rest/uri/titlehistory/uri-titlehistoryusersxuidhistorytitlesgetv2.md)
- [GET (/users/xuid({xuid})/scids/{scid}/stats)](https://docs.xbox.com/ja-jp/reference/live/rest/uri/userstats/uri-usersxuidscidsscidstatsget.md)
