1、重置分账号应用密匙
2、(timestamp, appId, sign)签名参数需通过url传递
3、接口支持https协议
http://api.polyv.net/live/v4/group/user/secret/reset
http://api.polyv.net/live/v4/group/user/secret/reset?appId=ga1ayl6dh2×tamp=1661443279000&sign=FD154894135E713FC2D0D64B2B33E72E&email=paasgrouptestpre01@polyv.net
private static final Logger log = LoggerFactory.getLogger(GroupTestLive.class);
/**
* 重置分账号应用密匙
* @throws IOException
* @throws NoSuchAlgorithmException
*/
@Test
public void groupSecretResetTest() throws IOException, NoSuchAlgorithmException {
//公共参数,填写自己的实际参数
String appId = super.groupAppId;
String appSecret = super.groupAppSecret;
String timestamp = String.valueOf(System.currentTimeMillis());
//业务参数
String url = "http://api.polyv.net/live/v4/group/user/secret/reset";
String email = "";
//http 调用逻辑
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("email", email);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
url = HttpUtil.appendUrl(url, requestMap);
String response = HttpUtil.postFormBody(url, null);
log.info("测试重置分账号应用密匙成功:{}", response);
//do somethings
}
{
"code": 200,
"status": "success",
"requestId": "6c8c2d016ace4366a0d8fe2ff632ba28.72.16614432795402597",
"data": {
"appId": "gcx4zavev0",
"appSecret": "50bxxxxxxxxxxxx68157635",
"userId": "eaf4fead20"
},
"success": true
}
{
"code": 400,
"status": "error",
"error": {
"code": 10003,
"desc": "时间戳过期"
},
"success": false
}