OAuth2刷新令牌-如何更新?

时间:2018-11-27 17:09:12

标签: node.js amazon-web-services oauth-2.0 quickbooks

我正在编写一个程序,使用我的QuickBooks帐户自动执行一些操作(使用Node js)。但是刷新令牌也到期了,我该怎么办?我收到此错误消息。

Error: The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.

1 个答案:

答案 0 :(得分:0)

您可以参考官方的node-oauth2.0 lib。 https://www.npmjs.com/package/intuit-oauth#refresh-access_token

您需要使用最新的refreshToken生成新的accessToken。

参考文档-https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization/oauth-2.0