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

# purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken

> Microsoft Store v8 收回 SAS 權杖端點，會產生 Azure Storage SAS 權杖，用於讀取您遊戲服務的收回事件訊息佇列。

此端點會產生 [SAS 權杖](https://learn.microsoft.com/azure/storage/common/storage-sas-overview)，以驗證並存取您的收回事件訊息佇列。
如需收回事件訊息佇列的詳細資訊，請參閱[從您的服務管理退款和退單](https://learn.microsoft.com/reference/xstore-managing-refunds-and-chargebacks)。

## 必要條件

請檢閱[服務對服務 API 的必要條件](https://learn.microsoft.com/reference/service-to-service-nav#prerequisites-for-service-to-service-apis)。

若要使用此 API，您必須在開發人員合作夥伴經理或 Microsoft 連絡人的協助下完成上線程序。
如需上線程序的詳細資訊，請參閱[必要設定 / 上線要求](https://learn.microsoft.com/reference/xstore-managing-refunds-and-chargebacks#required-setup--onboarding-request)。

## 要求

### 要求語法

| 方法 | 要求 URI |
| - | - |
| `GET` | `purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken` |

### 要求標頭

| 標頭 | 類型 | 描述 |
| - | - | - |
| `Authorization` | `string` | 必要。格式為 `Bearer` \<*token*> 的 Microsoft Entra ID 服務存取權杖。請參閱[建立 Microsoft Entra ID 存取權杖](https://learn.microsoft.com/reference/xstore-requesting-a-userstoreid#step-3-creating-microsoft-entra-id-access-tokens)。 |
| `Host` | `string` | 必須設定為值 `purchase.mp.microsoft.com`。 |

### 要求範例

```html theme={null}
GET https://purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken HTTP/1.1
Host: purchase.mp.microsoft.com
Authorization: Bearer [Microsoft Entra ID bearer token]
```

## 回應

### 回應本文

回應本文是包含下列值的 JSON。

| 參數 | 類型 | 描述 | 必要 |
| - | - | - | - |
| `expiresOn` | `DateTime` | SAS 權杖到期的 UTC 日期和時間 | 是 |
| `uri` | `string` | 結合的 Storage 資源 URI 和 [SAS 權杖](https://learn.microsoft.com/azure/storage/common/storage-sas-overview)，用來存取收回訊息佇列。 | 是 |

### 回應範例

```json theme={null}

HTTP/1.1 200 OK
Date: Thu, 08 Dec 2022 20:13:46 GMT
Content-Length: 243
Content-Type: application/json; charset=utf-8
ms-correlationid: 70e6f659-ceee-4050-bdf3-56ea3beefe23
ms-requestid: 8c80d7ff-73e2-4a5c-9aca-79059fbc1beb
ms-cv: tRscYtHLJHps.0
x-content-type-options: nosniff

{
    "expiresOn":"2022-12-09T02:13Z",
    "uri":"https://uluufeofsxh2k.queue.core.windows.net:443/gxhxcvb32lnk4?sv=2021-10-04&spr=https&st=2022-12-08T20%3A13%3A46Z&se=2022-12-09T02%3A13%3A46Z&sp=rp&sig=OneHfX99E820avICZvXJUF14IyDuv2BrvY0kj%2Ftxc70%3D"
}

```

## 使用 SAS 權杖存取收回事件訊息佇列

取得 `uri` 參數之後，您就可以存取佇列訊息。
如需詳細資訊，請參閱[處理來自佇列的收回訊息](https://learn.microsoft.com/reference/xstore-managing-refunds-and-chargebacks#processing-clawback-messages-from-the-queue)。

## 相關文章

[從您的服務管理退款和退單](https://learn.microsoft.com/reference/xstore-managing-refunds-and-chargebacks)

[從您的服務管理消耗品](https://learn.microsoft.com/reference/xstore-managing-consumables-and-refunds)

[從您的服務管理產品](https://learn.microsoft.com/reference/service-to-service-nav)

[使用 Microsoft Store API 驗證您的服務](https://learn.microsoft.com/reference/xstore-authenticating-your-service)

[Azure Queue Storage REST API](https://learn.microsoft.com/rest/api/storageservices/queue-service-rest-api)

[使用 .NET 的 Azure Queue Storage](https://learn.microsoft.com/azure/storage/queues/storage-dotnet-how-to-use-queues?tabs=dotnet)


## Related topics

- [purchase.mp.microsoft.com/v8.0/b2b/clawback/sastoken](/reference/microsoft-store-apis/xstore-v8-clawbackv2-sastoken.md)
- [Microsoft Store service APIs](/reference/microsoft-store-apis/xstore-nav.md)
- [APIs de servicio de Microsoft Store](/es/reference/microsoft-store-apis/xstore-nav.md)
- [Microsoft Store 服务 API](/zh-CN/reference/microsoft-store-apis/xstore-nav.md)
- [Microsoft Store 서비스 API](/ko/reference/microsoft-store-apis/xstore-nav.md)
