获取评价的回复信息Get response info for reviews

如果要以编程方式回复客户对你的应用的评价,可以在 Microsoft Store 评价 API 中使用此方法,以首先确定你是否有回复评价的权限。If you want to programmatically respond to a customer review of your app, you can use this method in the Microsoft Store reviews API to first determine whether you have permission to respond to the review. 你无法回复由选择不接收评价回复的客户提交的评价。You cannot respond to reviews submitted by customers who have chosen not to receive review responses. 确认你可以回复评价后,你可以使用提交对应用评价的回复方法以编程方式回复评价。After you confirm that you can respond to the review, you can then use the submit responses to app reviews method to programmatically respond to it.

先决条件Prerequisites

若要使用此方法,首先需要执行以下操作:To use this method, you need to first do the following:

  • 完成 Microsoft Store 分析 API 的所有先决条件(如果尚未这样做)。If you have not done so already, complete all the prerequisites for the Microsoft Store analytics API.
  • 获取 Azure AD 访问令牌,以供在此方法的请求标头中使用。Obtain an Azure AD access token to use in the request header for this method. 获取访问令牌后,在它到期前,你有 60 分钟的使用时间。After you obtain an access token, you have 60 minutes to use it before it expires. 该令牌到期后,可以获取新的令牌。After the token expires, you can obtain a new one.
  • 获取要检查的评价的 ID,以确定是否可以对其进行回复。Get the ID of the review you want to check to determine whether you can respond to it. 评价 ID 位于 Microsoft Store 分析 API 中的获取应用评价方法的回复数据中,以及评价报告脱机下载中。Review IDs are available in the response data of the get app reviews method in the Microsoft Store analytics API and in the offline download of the Reviews report.

请求Request

请求语法Request syntax

方法Method 请求 URIRequest URI
GETGET https://manage.devcenter.microsoft.com/v1.0/my/reviews/{reviewId}/apps/{applicationId}/responses/info

请求头Request header

HeaderHeader 在任务栏的搜索框中键入Type 描述Description
授权Authorization stringstring 必需。Required. Azure AD 访问令牌的格式为 Bearer token<>。The Azure AD access token in the form Bearer <token>.

请求参数Request parameters

参数Parameter 在任务栏的搜索框中键入Type 描述Description 必需Required
applicationIdapplicationId stringstring 其中的应用包含要确定是否可以回复的评价的应用商店 ID。The Store ID of the app that contains the review for which you want to determine whether you can respond to. Store ID 位于应用程序标识页在合作伙伴中心。The Store ID is available on the App identity page in Partner Center. 存储 ID 的一个示例是 9WZDNCRFJ3Q8。An example Store ID is 9WZDNCRFJ3Q8. Yes
reviewIdreviewId stringstring 要回复的评价 ID(这是一个 GUID)。The ID of the review you want to respond to (this is a GUID). 评价 ID 位于 Microsoft Store 分析 API 中的获取应用评价方法的回复数据中,以及评价报告脱机下载中。Review IDs are available in the response data of the get app reviews method in the Microsoft Store analytics API and in the offline download of the Reviews report.
如果忽略此参数,此方法的回复正文将指示你是否有回复指定应用的任何评价的权限。If you omit this parameter, the response body for this method will indicate whether you have permissions to respond to any reviews for the specified app.
No

请求示例Request example

以下示例演示如何使用此方法来确定是否可以回复给定的评价。The following examples how to use this method to determine whether you can respond to a given review.

GET https://manage.devcenter.microsoft.com/v1.0/my/reviews/6be543ff-1c9c-4534-aced-af8b4fbe0316/apps/9WZDNCRFJ3Q8/responses/info HTTP/1.1
Authorization: Bearer <your access token>

响应Response

响应正文Response body

Value 在任务栏的搜索框中键入Type 描述Description
CanRespondCanRespond 布尔Boolean 值为 true 表示你可以回复指定的评价,或者你有回复指定应用的任何评价的权限。The value true indicates that you can respond to the specified review, or that you have permissions to respond to any review for the specified app. 否则,此值将为 falseOtherwise, this value is false.
DefaultSupportEmailDefaultSupportEmail stringstring 应用的支持电子邮件地址,其在应用的应用商店一览中有所指定。Your app's support email address as specified in your app's Store listing. 如果未指定支持电子邮件地址,则此字段为空。If you did not specify a support email address, this field is empty.

 

响应示例Response example

以下示例举例说明此请求的 JSON 响应正文。The following example demonstrates an example JSON response body for this request.

{
  "CanRespond": true,
  "DefaultSupportEmail": "support@contoso.com"
}