> ## 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.

# POST /titles/{titleId}/invites/server API

> Send Server Invite

# Send Server Invite

指定された接続文字列を使用して XBOX ユーザーに招待を送信します。

この API により、ゲーム サーバーは XBOX Live ユーザーに招待を送信できます。リクエストの本文には、招待された相手がサーバーに参加するために使用する接続文字列が含まれます。接続文字列にはゲーム サーバーの IP、またはユーザーが参加しているセッションへのポインターを含めることができます。招待はプラットフォームに関係なく、登録済みのすべてのエンドポイントに送信されます。

```http theme={null}
POST /titles/{titleId}/invites/server
```

## URI パラメーター

| Parameter | In | Required | Type | Description |
| - | - | - | - | - |
| titleId | path | TRUE | integer | リクエストの送信対象となるゲームの titleId。 |

## リクエスト ヘッダー

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

## リクエスト本文

| Name | Required | Type | Description |
| - | - | - | - |
| invitedUsers | TRUE | string\[] | 招待の送信先ユーザーの XUID。XUID は 10 進整数として表されます。最大 16 個の XUID を指定できます。 |
| sender | TRUE | string | 招待を代理で送信するユーザーの ID。 |
| connectionString | | string | 接続文字列は、招待がユーザーに到達したときにゲームに渡されるものです。接続文字列には通常、招待されたユーザーが参加できるようにするためのサーバー IP などの情報が含まれます。接続文字列フィールドが空のままの場合、タイトルは空の接続文字列で呼び出されます。接続文字列の長さは 512 文字に制限されています。 |
| platform | | [Platform](#platform) | |

## レスポンス

| Name | Type | Description |
| - | - | - |
| 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." |
| Other Status Codes | [ThrottledEntity](#throttledentity) | リクエストが多すぎます。Headers Retry-After: integer |

## 定義

* [ErrorResponse](#errorresponse)
* [Platform](#platform)
* [SendServerInviteRequest](#sendserverinviterequest)
* [ThrottledEntity](#throttledentity)

### ErrorResponse

| Name | Type | Description |
| - | - | - |
| debugMessage | string | デバッグに使用できる、人間が読めるエラー メッセージ。 |
| errorCode | string | エラー コード列挙型。 |

### Platform

| Name | Type | Description |
| - | - | - |
| Android | string | |
| IOS | string | |
| Nintendo | string | |
| PlayStation | string | |
| Scarlett | string | |
| Win32 | string | |
| WindowsOneCore | string | |
| XboxOne | string | |

### SendServerInviteRequest

| Name | Type | Description |
| - | - | - |
| connectionString | string | 接続文字列は、招待がユーザーに到達したときにゲームに渡されるものです。接続文字列には通常、招待されたユーザーが参加できるようにするためのサーバー IP などの情報が含まれます。接続文字列フィールドが空のままの場合、タイトルは空の接続文字列で呼び出されます。接続文字列の長さは 512 文字に制限されています。 |
| invitedUsers | string\[] | 招待の送信先ユーザーの XUID。XUID は 10 進整数として表されます。最大 16 個の XUID を指定できます。 |
| platform | [Platform](#platform) | |
| sender | string | 招待を代理で送信するユーザーの ID。 |

### ThrottledEntity

| Name | Type | Description |
| - | - | - |
| currentRequests | string | 現在のリクエスト数 - 同時実行数またはレート。 |
| debugMessage | string | デバッグに使用できる、人間が読めるスロットル メッセージ。 |
| limitType | string | 制限の種類 (例: 同時実行またはレート)。 |
| maxRequests | string | 許可される最大リクエスト数 - 同時実行数またはレート。 |
| periodInSeconds | string | レートまたは同時実行の制限を超えた場合に適用される秒単位の期間。 |
| version | string | 現在のスロットル契約バージョン。 |


## Related topics

- [Invites](https://devdocs.xbox.com/services/xbox-services/multiplayer/mpa/concepts/live-mpa-invites.md)
- [Quickstart PlayFab REST API collection for Postman](https://devdocs.xbox.com/services/playfab/sdks/postman/postman-quickstart.md)
- [Exemple Windows Runner](https://devdocs.xbox.com/fr/services/playfab/multiplayer/servers/windows-runner-sample.md)
- [Início rápido da coleção da API REST do PlayFab para Postman](https://devdocs.xbox.com/pt-BR/services/playfab/sdks/postman/postman-quickstart.md)
- [适用于 Postman 的 PlayFab REST API 集合快速入门](https://devdocs.xbox.com/zh-CN/services/playfab/sdks/postman/postman-quickstart.md)
