声网token认证与获取频道用户列表
// 拼接客户 ID 和客户密钥并使用 base64 编码
String plainCredentials = customerKey + ":" + secret;
String base64Credentials = new String(Base64.getEncoder().encode(plainCredentials.getBytes()));
// 创建 authorization header
String authorizationHeader = "Basic " + base64Credentials;
Map map = new HashMap();
map.put("Authorization",authorizationHeader);
map.put("Content-Type","application/json");
String result =null;
try {
result = httpService.doGet("https://api.agora.io/dev/v1/projects",null,"GET",map,null);
} catch (Exception e) {
ResultUtil.success(ResultEnum.OPERATE_SUCCESS,"false");
e.printStackTrace();
}
JSONObject js = JSONObject.parseObject(result);
boolean flag = (boolean) js.get("success");
if (flag){