Open aniespica opened 2 years ago
This behavior is very intermittent, occurring 2 or 1 times over the week. The new refresh token cannot get a new access token and a new refresh token.
Our code does:
const QuickbooksOauthClient = require("intuit-oauth"); const quickbooksOauthClient = new QuickbooksOauthClient(getOauthConfig()); const response = await quickbooksOauthClient.refreshUsingToken(clientsCredentials.RefreshToken);
When the refresh fails the response of qb.refreshUsingToken(token) is:
qb.refreshUsingToken(token)
{ "url": "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer", "headers": { "date": "Fri, 13 May 2022 05:10:41 GMT", "content-type": "application/json;charset=utf-8", "content-length": "25", "connection": "close", "intuit_tid": "1-627de851-4479c0f75a6b53953216f423", "x-spanid": "d48d9af9-627f-4e27-80c8-d03edc70538e", "x-amzn-trace-id": "Root=1-627de851-4479c0f75a6b53953216f423", "x-content-type-options": "nosniff", "server": "envoy", "cache-control": "no-cache, no-store", "pragma": "no-cache", "x-envoy-upstream-service-time": "30", "strict-transport-security": "max-age=31536000" }, "body": "{\"error\":\"invalid_grant\"}", "status": 400, "statusText": "Bad Request" }
We tried multiple times to refresh the token but always responded with the error invalid_grant. Our current solution is to authenticate again with the OAuth2.0
invalid_grant
This behavior is very intermittent, occurring 2 or 1 times over the week. The new refresh token cannot get a new access token and a new refresh token.
Our code does:
When the refresh fails the response of
qb.refreshUsingToken(token)
is:We tried multiple times to refresh the token but always responded with the error
invalid_grant
. Our current solution is to authenticate again with the OAuth2.0