Map<String, String> params = new HashMap<String, String>();
String time = String.valueOf(System.currentTimeMillis());
params.put("client_id", "自己的应用Id");
params.put("grant_type", "client_credentials");
String sign= MD5.MD5Encode("自己的应用Id" + time + API密钥); params.put("sign","sign");
params.put("scope", "all");
params.put("timestamp", time);
params.put("id", "3F2504E0-4F89-11D3-9A0C-0305E82C3301");
HttpClient httpClient = new HttpClient();
PostMethod post = new PostMethod("https://open-api.10ss.net/oauth/oauth");
for (Map.Entry<String, String> entry : params.entrySet()) {
post.addParameter(entry.getKey(), entry.getValue());
}
HttpMethodParams param = post.getParams();
param.setContentCharset("UTF-8");
try {
httpClient.executeMethod(post);
} catch (HttpException e) {
e.printSta
JAVA易联云打印机获取access_token
最新推荐文章于 2022-07-07 10:39:34 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)