public AppAccessTokenResult RefreshAppAccessToken(AppConfidential appConfidential) { if (CheckApplication.AppHasAccess(appConfidential.AppId, appConfidential.AppSecret)) { WXCONFIG.WX_GLOBAL_APPID = appConfidential.AppId; WXCONFIG.WX_GLOBAL_SECRET = appConfidential.AppSecret; CacheHelper.RemoveCache(AccessTokenManager.GetAccessTokenCacheKey()); var res = AccessTokenManager.GetAccessToken(); AppAccessTokenResult ret = new AppAccessTokenResult(); ret.Access_token = res.Token; ret.StartTime = res.StartTime; ret.ExpireTime = res.ExpireTime; return(ret); } else { return(new AppAccessTokenResult() { Access_token = string.Empty }); } }