Quickbook在使用phpsdk时获得Accesstoken问题

时间:2015-06-05 10:24:48

标签: php api quickbooks quickbooks-online

尝试使用沙盒连接quickbook,但在授权后显示签名问题。

之前完成此操作的任何人都可以在php中向我发送工作示例代码。

OAuthException Object
(
    [message:protected] => Invalid auth/bad request (got a 401, expected HTTP/1.1 20X or a redirect)
    [string:Exception:private] => 
    [code:protected] => 401
    [file:protected] => /var/www/mssdev/quickbook/PHPSample/Test/oauth.php
    [line:protected] => 37
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [file] => /var/www/mssdev/quickbook/PHPSample/Test/oauth.php
                    [line] => 37
                    [function] => getAccessToken
                    [class] => OAuth
                    [type] => ->
                    [args] => Array
                        (
                            [0] => https://oauth.intuit.com/oauth/v1/get_access_token
                        )

                )

        )

    [previous:Exception:private] => 
    [lastResponse] => oauth_problem=signature_invalid
    [debugInfo] => Array
        (
            [sbs] => GET&https%3A%2F%2Foauth.intuit.com%2Foauth%2Fv1%2Fget_access_token&oauth_consumer_key%3DqyprdVAVnQU3sqJFd8R2SfksB73AXF%26oauth_nonce%3D1585561009557178083e35b6.09089809%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1433499656%26oauth_token%3DqyprdwSq502Ge9SEEBRIJ2ybhPCFtX7lo7H0gtGOPoGFGKrF%26oauth_verifier%3Ddrg9rff%26oauth_version%3D1.0
            [headers_recv] => HTTP/1.1 401 Unauthorized
Date: Fri, 05 Jun 2015 10:20:58 GMT
Server: Apache
WWW-Authenticate: OAuth oauth_problem="signature_invalid"
Cache-Control: no-cache, no-store
Pragma: no-cache
Content-Length: 31
Connection: close
Content-Type: text/plain
X-Pad: avoid browser bug
            [body_recv] => oauth_problem=signature_invalid
        )

)