我正在研究我的应用程序上的intuit集成。现在我被困在重新连接它的过程。在重新连接时,我遇到了以下异常:
Message: Token Refresh Window Out of Bounds Caused By: null
实际上,在测试时我使用了未过期的密钥。这是我得到这个例外的原因吗?
我正在研究java,我的java代码是:
public void renewQBOAccessToken(HttpServletRequest req, HttpServletResponse resp) {
LOGGER.info("Inside renewQBOAccessToken method.");
HttpSession session = req.getSession();
Intuit intuit;
try {
intuit = IntuitLocalServiceUtil.getIntuit(PortalUtils.getCompanyId(req), PortalUtils.getOrganisationId(req));
LOGGER.info("Values before ::::::::::::::::");
IAPlatformClient client = new IAPlatformClient();
client.reConnect(PropsUtil.get(CommonConstants.INTUIT_QB_OAUTH_CONSUMER_KEY),
PropsUtil.get(CommonConstants.INTUIT_QB_OAUTH_CONSUMER_SECRET), intuit.getOauthToken(), intuit.getOauthTokenSecret());
getAccessToken(req, resp);
LOGGER.info(">>>>>>>>>>>> values after reconnect: ");
LOGGER.info("accesstoken: +" + session.getAttribute(CommonConstants.INTUIT_QB_OAUTH_ACCESS_TOKEN_KEY));
LOGGER.info("access token secret:" + session.getAttribute(CommonConstants.INTUIT_QB_OAUTH_ACCESS_TOKEN_SECRET));
} catch (PortalException | SystemException e1) {
LOGGER.error(e1.getClass().getName() + " Exception while reconnecting #renewQBOAccessToken Class: "
+ e1.getClass().getSimpleName() + " Message: " + e1.getMessage() + " Caused By: " + e1.getCause());
} catch (ConnectionException e) {
LOGGER.error(e.getClass().getName() + " ConnectionException while reconnecting #renewQBOAccessToken Class: "
+ e.getClass().getSimpleName() + " Message: " + e.getMessage() + " Caused By: " + e.getCause());
}
}
谢谢。
答案 0 :(得分:0)
是。该令牌不会在到期后的30天内。
请参阅https://developer.intuit.com/docs/0025_quickbooksapi/0053_auth_auth/oauth_management_api了解回复。