如何在 PHP 中创建 Quickbooks Online 请求签名 [英] How to create a Quickbooks Online request signature in PHP

查看:46
本文介绍了如何在 PHP 中创建 Quickbooks Online 请求签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道 QBO 本身并不支持 PHP,但是如果我可以让经过身份验证的请求工作,我可以直接使用他们的 API.

I know QBO doesn't natively support PHP, but If I can get authenticated requests working, I can just use their API directly.

我有以下数据

appid
oAuth consumer key
oAuth secret key

我正在对此端点进行 API 调用

I'm making an API call to this endpoint

https://qb.sbfinance.intuit.com/v3/company/<<my company id>>/item

我正在使用 googles oauth-php 库来尝试完成这项工作.这是结果

I'm using googles oauth-php library to try to make this work. Here is the result

message=Exception authenticating OAuth; errorCode=003200; statusCode=401

我显然缺少有关此处操作的详细信息,例如:如何将应用 ID 与此一起发送.有没有人有使用 PHP 获取签名的经验或示例?

I'm obviously missing details on what to do here, ex: how to send the app id along with this. Does anyone have any experience or examples of getting a signature using PHP?

谢谢!

推荐答案

我们有一个完整的 QuickBooks PHP 库 具有有效的 OAuth 实现.

We have a complete QuickBooks PHP library that has a working OAuth implementation.

您可以在这里下载:

有一个身份验证示例:

  • docs/example_ipp_oauth.php

以及数据访问示例:

  • docs/example_ipp_ids_5.php
  • docs/example_ipp_ids_6.php
  • docs/example_ipp_ids_7.php

Google OAuth 库也应该可以使用 - 它是标准的 OAuth 实现,我们过去曾成功使用过 Google OAuth 库.

The Google OAuth libs should work also- it's a standard OAuth implementation and we've used the Google OAuth libs successfully in the past.

这篇关于如何在 PHP 中创建 Quickbooks Online 请求签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆