function main() {
    const corpid = SYSTEM_CONFIG.find(item => item.name === 'dingtalk_corpid').value;
    const appkey = SYSTEM_CONFIG.find(item => item.name === 'dingtalk_appkey').value;
    const appid = SYSTEM_CONFIG.find(item => item.name === 'dingtalk_clientId').value;
    const appsecret = SYSTEM_CONFIG.find(item => item.name === 'dingtalk_appsecret').value;

    const req = {
        url: `https://oapi.dingtalk.com/gettoken?appkey=${appkey}&appsecret=${appsecret}`
    }

    const res = request.parse(req).body.toObject()
    //     {
    //     "errcode": 0,
    //     "access_token": "9c499abd27fe373b8c8f1fbed327ba4e",
    //     "errmsg": "ok",
    //     "expires_in": 7200
    // }


    if (res.access_token) {
        return okMsg(res.access_token)
    }

    cache.set('oauth', 'dingtalk', res.access_token, 7000 * 1000)
    os.sleep(7000)
    main()
}


// const access_token = cache.get('oauth', document.phone)
// if (access_token == null) {
//     return false
// }