无关风月
2024-12-09 2053b8fe0e98d4b4449bc756a93ced78f42277c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//// This file is auto-generated, don't edit it. Thanks.
//package com.jilongda.applet.utils.dingding;
//
//import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenResponse;
//import com.aliyun.tea.*;
//
//public class AccessTokenUtil {
//
//    /**
//     * 使用 Token 初始化账号Client
//     * @return Client
//     * @throws Exception
//     */
//    public static com.aliyun.dingtalkoauth2_1_0.Client createClient() throws Exception {
//        com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config();
//        config.protocol = "https";
//        config.regionId = "central";
//        return new com.aliyun.dingtalkoauth2_1_0.Client(config);
//    }
//
//    public static void gettoken() throws Exception {
////        java.util.List<String> args = java.util.Arrays.asList(args_);
//        com.aliyun.dingtalkoauth2_1_0.Client client = AccessTokenUtil.createClient();
//        com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenRequest getAccessTokenRequest = new com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenRequest()
//                .setAppKey("ding9xnitayotphtuaxa")
//                .setAppSecret("8I88pUQgJyteYsGscECS-RAIkc-vh2HlJwDzX5dhIFkI4Avpo5D_dmXBQM9flVzC");
//        try {
//          client.getAccessToken(getAccessTokenRequest);
//
//            return;
//        } catch (TeaException err) {
//            if (!com.aliyun.teautil.Common.empty(err.code) && !com.aliyun.teautil.Common.empty(err.message)) {
//                // err 中含有 code 和 message 属性,可帮助开发定位问题
//            }
//
//        } catch (Exception _err) {
//            TeaException err = new TeaException(_err.getMessage(), _err);
//            if (!com.aliyun.teautil.Common.empty(err.code) && !com.aliyun.teautil.Common.empty(err.message)) {
//                // err 中含有 code 和 message 属性,可帮助开发定位问题
//            }
//
//        }
//    }
//}