> ## 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 (/users/xuid({xuid})/devices/current/titles/current)

> POST (/users/xuid({xuid})/devices/current/titles/current)

# POST (/users/xuid({xuid})/devices/current/titles/current)

以使用者的目前狀態更新遊戲。
這些 URI 的網域為 `userpresence.xboxlive.com`。

* [備註](#ID4EV)
* [URI 參數](#ID4EEB)
* [授權](#ID4EPB)
* [必要的要求標頭](#ID4ENE)
* [選用的要求標頭](#ID4ERG)
* [要求本文](#ID4ERH)
* [回應本文](#ID4EKAAC)

<a id="ID4EV" />

## 備註

非主機平台上的所有遊戲都可以使用此 URI，為遊戲新增及更新目前狀態、豐富目前狀態和媒體目前狀態資料。

**SandboxId** 現在會從 XToken 中的宣告擷取並強制執行。如果 **SandboxId** 不存在，則 Entertainment Discovery Services (EDS) 會擲回 400 Bad request 錯誤。

<a id="ID4EEB" />

## URI 參數

| 參數 | 類型 | 描述 |
| - | - | - |
| xuid | 64 位元不帶正負號的整數 | 目標使用者的 XBOX 使用者識別碼 (XUID)。 |

<a id="ID4EPB" />

## 授權

\| 類型| 必要| 描述| 遺漏時的回應|
\| --- | --- | --- | --- | --- | --- | --- |
\| XUID| 是| 呼叫端的 XBOX 使用者識別碼 (XUID)| 403 Forbidden|
\| titleId| 是| 遊戲的 titleId| 403 Forbidden|
\| deviceId| 除了 Windows 和 Web 以外皆為是| 呼叫端的 deviceId| 403 Forbidden|
\| deviceType| 除了 Web 以外皆為是| 呼叫端的 deviceType| 403 Forbidden|
\| sandboxId| 來自以下來源的呼叫為是 | 呼叫端的沙箱| 403 Forbidden|

<a id="ID4ENE" />

## 必要的要求標頭

\| 標頭| 類型| 描述|
\| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
\| Authorization| string| HTTP 驗證的驗證認證。範例值："XBL3.0 x=\<userhash>;\<token>"。|
\| x-xbl-contract-version| string| 此要求應導向之 XBOX LIVE 服務的組建名稱/編號。只有在驗證標頭的有效性、驗證權杖中的宣告等之後，要求才會路由至該服務。範例值：3、vnext。|
\| Content-Type| string| 要求本文的 MIME 類型。範例值：application/json。|
\| Content-Length| string| 要求本文的長度。範例值：312。|
\| Host| string| 伺服器的網域名稱。範例值：presencebeta.xboxlive.com。|

<a id="ID4ERG" />

## 選用的要求標頭

\| 標頭| 類型| 描述|
\| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
\| X-RequestedServiceVersion|  | 此要求應導向之 XBOX LIVE 服務的組建名稱/編號。只有在驗證標頭的有效性、驗證權杖中的宣告等之後，要求才會路由至該服務。預設值：1。|

<a id="ID4ERH" />

## 要求本文

要求物件是 [TitleRequest](/zh-TW/reference/live/rest/json/json-titlerequest)。只有實際存在於本文中的屬性才會更新。任何不屬於本文但存在於伺服器上的屬性都不會被修改。

<a id="ID4EAAAC" />

### 要求範例

```cpp theme={null}
{
  id:"12341234",
  placement:"snapped",
  state:"active"
}
      
```

<a id="ID4EKAAC" />

## 回應本文

成功時，會視情況傳回 HTTP 狀態碼 200 或 201 Created。

發生錯誤時 (HTTP 4xx 或 5xx)，會在回應本文中傳回適當的錯誤資訊。

<a id="ID4EVAAC" />

## 另請參閱

<a id="ID4EXAAC" />

##### 上層

[/users/xuid({xuid})/devices/current/titles/current](/zh-TW/reference/live/rest/uri/presence/uri-usersxuiddevicescurrenttitlescurrent)

<a id="ID4EBBAC" />

##### 詳細資訊

[Marketplace URI](/zh-TW/reference/live/rest/uri/marketplace/atoc-reference-marketplace)

[其他參考](/zh-TW/reference/live/rest/additional/atoc-xboxlivews-reference-additional)


## Related topics

- [Troubleshoot XBOX Services traffic on PC](/build/gdk-and-engines/guides/troubleshoot-xbox-services-traffic.md)
- [Solucionar problemas de tráfego do XBOX Services no PC](/pt-BR/build/gdk-and-engines/guides/troubleshoot-xbox-services-traffic.md)
- [Solución de problemas del tráfico de los servicios XBOX en PC](/es/build/gdk-and-engines/guides/troubleshoot-xbox-services-traffic.md)
- [Résoudre les problèmes de trafic des XBOX Services sur PC](/fr/build/gdk-and-engines/guides/troubleshoot-xbox-services-traffic.md)
- [在 PC 上排查 XBOX 服务流量问题](/zh-CN/build/gdk-and-engines/guides/troubleshoot-xbox-services-traffic.md)
