目录

回复评论和回复

功能介绍

开发者在自己的鸿蒙应用下回复用户的评论,并支持继续回复用户的回复。

使用约束

接口原型

承载协议

HTTPS POST

接口方向

开发者服务器->应用市场服务端

接口URL

https://{domain}/api/marketing-api/v2/reviews/manage/dev/reviews

  • 中国站点的domain:connect-api.cloud.huawei.com
注意:

调用获取Token接口时使用的域名必须与本接口域名保持一致,例如本接口使用“connect-api-dre.cloud.huawei.com”,则调用获取Token接口必须使用“https://connect-api-dre.cloud.huawei.com/api/oauth2/v1/token”。

数据格式

请求消息:Content-Type: application/json

响应消息:Content-Type: application/json

请求参数

[h2]Body

参数

必选(M)/可选(O)

类型

描述

lang

M

String

语言,支持:

  • zh:中文
  • en:英文
  • bo:藏语
  • ug:维吾尔语

appId

M

String

应用ID。

reviewId

M

Long

评论ID。

devReplyContent

M

String

回复内容。

countryCode

M

String

ISO标准国家码。

toReplyId

O

String

回复ID。

说明:

非必传参数,传递这个参数说明回复的是用户的回复。

[h2]Header

参数

必选(M)/可选(O)

类型

描述

client_id

M

String

客户端ID,获取方法参考API客户端方式。

Authorization

M

String

认证信息,格式为“Authorization: Bearer ${access_token}”。access_token为获取Token中获取的access_token。

请求示例

POST https://connect-api.cloud.huawei.com/api/marketing-api/v2/reviews/manage/dev/reviews 
client_id: ***  
Authorization: Bearer *** 
Content-Type: application/json  
{ 
  "lang": "zh", 
  "appId": "11111", 
  "reviewId": "9f43c56228854d66a65921938199c0ce", 
  "devReplyContent": "Reply content......", 
  "countryCode": "CN" 
}

响应参数

参数

必选(M)/可选(O)

类型

描述

rtnCode

M

Integer

返回码。

rtnDesc

M

String

返回码描述信息。

响应示例

{ 
  "rtnCode": 0, 
  "rtnDesc": "string" 
}

调用示例

curl -X POST https://connect-api.cloud.huawei.com/api/marketing-api/v2/reviews/manage/dev/reviews -H 'client_id: ***' -H 'Authorization: Bearer ***' -H 'Content-Type: application/json' -d '{ 
  "lang": "zh", 
  "appId": "11111", 
  "reviewId": "9f43c56228854d66a65921938199c0ce", 
  "devReplyContent": "Reply content......", 
  "countryCode": "CN" 
}'