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

# GET /titles/{titleId}/users/{xuid}/activities API

> Get Activity

# Get Activity

特定のタイトルをプレイしているユーザーのアクティビティを取得します。この API を使用すると、ゲーム クライアントまたはサーバーは特定のタイトルをプレイしているユーザーのアクティビティを取得できます。

```http theme={null}
GET /titles/{titleId}/users/{xuid}/activities
```

## URI パラメーター

| パラメーター | 場所 | 必須 | 種類 | 説明 |
| - | - | - | - | - |
| titleId | path | TRUE | integer | リクエストが送信されているゲームの titleId。 |
| xuid | path | TRUE | string | 現在のリクエストで参照されているユーザーの XUID。XUID は基数 10 の整数として表現されます。 |

## リクエスト ヘッダー

| 名前 | 必須 | 種類 | 説明 |
| - | - | - | - |
| Authorization | TRUE | integer | 呼び出し元は XBL 3.0 承認形式で XToken を指定する必要があります。例: Authorization: XBL3.0 x=2553948354698;>encrypted token\<) |
| Content-Type | TRUE | string | ContentType は application/json に設定する必要があります |

## 応答

| 名前 | 種類 | 説明 |
| - | - | - |
| 200 OK | GetActivityResponse | 指定されたユーザーのアクティビティを含む戻りオブジェクト。 |
| 204 No Content | | リクエストは成功しましたが、返すアクティビティが見つかりませんでした。 |
| 400 Bad Request | [ErrorResponse](#errorresponse) | リクエスト処理中にエラーが発生しました。可能なエラー コード: "RequestValidationError: The request validation has failed.", " AuthorizationError: The caller is not allowed to access the resource. Too many requests." |
| その他のステータス コード | [ThrottledEntity](#throttledentity) | リクエストが多すぎます。ヘッダー Retry-After: integer |

## 定義

* [ErrorResponse](#errorresponse)
* [GetActivityResponse](#getactivityresponse)
* [JoinRestriction](#joinrestriction)
* [Platform](#platform)
* [ThrottledEntity](#throttledentity)

### ErrorResponse

| 名前 | 種類 | 説明 |
| - | - | - |
| debugMessage | string | デバッグに使用できる、人間が読めるエラー メッセージのバージョン。 |
| errorCode | string | エラー コード列挙型。 |

### GetActivityResponse

| 名前 | 種類 | 説明 |
| - | - | - |
| connectionString | string | 接続文字列は、ゲームに参加するために接続クライアントに渡されるオブジェクトです。接続文字列には通常、参加するユーザーが接続できるようにするサーバー IP などの情報が含まれています。接続文字列の長さは 512 文字に制限されています。 |
| currentPlayers | integer | マルチプレイヤー アクティビティで既にユーザーと一緒にプレイしているプレーヤーの数。 |
| groupId | string | 同じゲームの一部としてプレイしているすべてのユーザーをグループ化するための一意識別子。 |
| joinRestriction | [JoinRestriction](#joinrestriction) | 現在のプレーヤーに誰が参加できるかを有効にする設定。 |
| maxPlayers | integer | 現在のアクティビティでこのプレーヤーと一緒にプレイできる最大プレーヤー数。 |
| platform | [Platform](#platform) | |
| sequenceNumber | string | これは、クライアントが各リクエストで渡す必要がある単調増加する数値 (ulong) の文字列表現です。アクティビティへの更新の順序を保証するために使用されます。sequenceNumber の良い例は、増加することが保証されているためクライアントの unix 時刻です。0 より大きく、ulong の最大値以下である必要があります。 |
| titleId | integer | アクティビティが要求されたゲームの titleId。 |

### JoinRestriction

| 名前 | 種類 | 説明 |
| - | - | - |
| Followed | string | |
| InviteOnly | string | |
| Public | string | |

### Platform

| 名前 | 種類 | 説明 |
| - | - | - |
| Android | string | |
| IOS | string | |
| Nintendo | string | |
| PlayStation | string | |

### ThrottledEntity

| 名前 | 種類 | 説明 |
| - | - | - |
| currentRequests | string | 現在のリクエスト数 - 同時実行またはレート。 |
| debugMessage | string | デバッグに使用できる、人間が読めるスロットル メッセージのバージョン。 |
| limitType | string | 制限の種類 (同時実行またはレート)。 |
| maxRequests | string | 許容される最大リクエスト数 - 同時実行またはレート。 |
| periodInSeconds | string | レートまたは同時実行の制限を超えたときに適用される期間 (秒単位)。 |
| version | string | 現在のスロットル コントラクトのバージョン。 |


## Related topics

- [Example code for Multiplayer Activity](https://devdocs.xbox.com/services/xbox-services/multiplayer/mpa/how-to/live-mpa-client-how-to.md)
- [XblMultiplayerActivityDetails](https://devdocs.xbox.com/reference/live/xsapi-c/multiplayer_c/structs/xblmultiplayeractivitydetails.md)
- [Activities](https://devdocs.xbox.com/services/xbox-services/multiplayer/mpa/concepts/live-mpa-activities.md)
- [Sending reputation feedback from a title](https://devdocs.xbox.com/services/xbox-services/community/reputation/concepts/live-sending-reputation-feedback.md)
- [XblPresenceTitlePresenceChangedHandler](https://devdocs.xbox.com/reference/live/xsapi-c/presence_c/functions/xblpresencetitlepresencechangedhandler.md)
