> ## 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 (/handles)

> POST (/handles)

# POST (/handles)

사용자의 현재 활동에 대한 멀티플레이어 세션을 설정하고, 필요한 경우 세션 멤버를 초대합니다.

> **중요:**\
> 이 메서드는 2015 멀티플레이어에서 사용되며 해당 멀티플레이어 버전 이상에만 적용됩니다. 템플릿 계약 104/105 이상과 함께 사용하도록 설계되었으며, 모든 요청에 X-Xbl-Contract-Version: 104/105 이상의 헤더 요소가 필요합니다.

* [설명](#ID4ET)
* [URI 매개 변수](#ID4EHB)
* [HTTP 상태 코드](#ID4EPB)
* [요청 본문](#ID4EVB)
* [응답 본문](#ID4EJC)

## 설명

이 HTTP/REST 메서드는 현재 활동에 대한 세션을 설정하는 데 사용할 수 있습니다. 이 경우 메서드는 **Microsoft.Xbox.Services.Multiplayer.MultiplayerService.SetActivityAsync**로 래핑될 수 있습니다. 요청 본문은 JSON 파일의 **sessionRef** 개체를 사용하여 세션 참조를 정의해야 하며 type 필드는 "activity"로 설정합니다. 응답 본문은 검색되지 않습니다. 세션 참조에 지정된 항목의 정의는 **Microsoft.Xbox.Services.Multiplayer.MultiplayerSessionReference**를 참조하십시오.

이 POST 메서드는 또한 핸들로 지정된 사용자를 세션에 초대하는 데 사용할 수도 있습니다. 이 경우 메서드는 **Microsoft.Xbox.Services.Multiplayer.MultiplayerService.SendInvitesAsync**로 래핑될 수 있습니다. POST 메서드의 이러한 사용은 요청 본문이 세션 참조를 정의해야 하지만 type 필드를 "invite"로 설정해야 합니다. 응답 본문은 초대 핸들입니다.

## URI 매개 변수

없음

## HTTP 상태 코드

서비스는 MPSD에 적용되는 HTTP 상태 코드를 반환합니다.

## 요청 본문

### 활동 설정을 위한 요청 본문

```cpp theme={null}
{
  "version": 1,
  "type": "activity",
  "sessionRef": {
    "scid": "bd6c41c3-01c3-468a-a3b5-3e0fe8133862",
    "templateName": "deathmatch",
    // The session name is optional in a POST; if not specified, MPSD fills in a GUID.//
    "name": "session-49"
  },
}

```

### 초대 전송을 위한 요청 본문

```cpp theme={null}
{
  // Common handle fields
  "id: "47ca0049-a5ba-4bc1-aa22-fcf834ce4c13",
  "version": 1,
  "type": "invite",
  "sessionRef": {
    "scid": "bd6c41c3-01c3-468a-a3b5-3e0fe8133862",
    "templateName": "deathmatch",
    "name": "session-49"
   },
   "inviteAttributes": {
     "titleId" : {titleId}, // The title being invited to, in decimal uint32. This value is used to find the title name and/or image.
     "context" : {context}, // The title defined context token. Must be 256 characters or less when URI-encoded.
     "contextString" : {contextstring}, // The string name of a custom invite string to display in the invite notification.
     "senderString" : {sender} // The string name of the sender when the sender is a service.
   },
   "invitedXuid": "3210",
}

```

## 응답 본문

### 활동 설정을 위한 응답 본문

없음.

### 초대 전송을 위한 응답 본문

초대 핸들.

## 함께 보기

##### 상위

[/handles](https://devdocs.xbox.com/ko/reference/live/rest/uri/sessiondirectory/uri-handles)


## Related topics

- [PFLobbyPostUpdate](https://devdocs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbypostupdate.md)
- [PFLobbyServerPostUpdate](https://devdocs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdate.md)
- [PFLobbyServerPostUpdateAsServer](https://devdocs.xbox.com/services/playfab/multiplayer/lobby/playfabmultiplayerreference-cpp/pflobby/functions/pflobbyserverpostupdateasserver.md)
