如何进行 quickbooks Api 调用并绕过登录

how to make an quickbooks Api call and bypass login

我知道我可能会得到 "no, you can't do that" 但我觉得这不合理。

我的客户使用 Quickbooks Online 并希望能够让他的客户登录到他的网站并查看他们欠了多少钱,然后用信用卡支付他们的发票。

显然,客户自己无法登录 Quickbooks Online。我们希望 Web 服务器能够通过 api.

直接访问数据

我找到了 api 但我不确定网络服务器是否可以连接到它并获取它需要的数据。

我知道这可以用其他系统来完成。我已经使用 OAuth2 通过 GMail 和 Salesforce 完成了它。

我想从 quickbooks 加载的最大的一块也可能是不可用的东西,因为我在 API 的任何地方都找不到它。当我的客户打开 Quickbooks Online 时,他可以向任何客户发送电子邮件,其中包含 link 以通过信用卡在线支付。我们希望能够找到 link 并将用户重定向到它。但我不确定是否可以通过 api.

我可以使用 webhooks,但这需要将所有数据存储在我们的网络服务器上,并将其与现有数据同步。更不用说如果更新失败会发生什么。

您有点误解了 OAuth 的工作原理,这就是造成此处混淆的原因。

拥有 QuickBooks 公司的人登录,而不是最终用户。他们登录一次,这会为您提供 OAuth 令牌,您可以使用这些令牌永远进行服务器到服务器的调用。

太棒了...

I know I'm probably going to get a "no, you can't do that" but it doesn't seem reasonable to me.

可以做你想做的事,你只是用错了方法。

Obviously, the customers themselves can't be signing into Quickbooks Online.

正确。

We want the web server to be able to directly access the data via the api.

很好,完全可行。

I've found the api but I'm not sure if it's possible to have the webserver connecting to it and getting the data it needs.

这是可行的。

此处的关键理解是,您将拥有一个 OAuth 连接过程,拥有 QuickBooks 的人将仅通过一次,以获得 OAuth 令牌。

然后您将在服务器端存储这些 OAuth 令牌(例如,在您的数据库中)。

然后,您可以随时使用这些存储的 OAuth 令牌进行未来的服务器到服务器 API 调用。

When my client opens Quickbooks Online, he can send an email to any customer that will include a link to pay online by credit card. We'd like to be able to find that link and redirect the user to it. But I'm not sure if it's available via the api.

我认为目前无法通过 API 获得此信息。

有一个 API 端点可以发送电子邮件发票,如果有帮助的话: https://developer.intuit.com/docs/api/accounting/invoice