Logo
Home

QuickBooks OAuth – PHP Example

2014-02-25_15-35-00

I put together a new code example that you can run in less than 5 min. You don’t need to worry about dependencies, libraries or SDKs. I have that all taken care of.

Go run the QuickBooks OAuth example here

Your feedback is very important with this new type of sample code. Do you like the runnable.com format? Would you like to see more of these examples or do you prefer other examples? Are you interested in contributing examples, then having us link to them? Any feedback is helpful, as no feedback is a sign that this type of example is not valuable.


Posted

in

by

Tags:

Comments

13 responses to “QuickBooks OAuth – PHP Example”

  1. Karl Irvin Avatar

    I like this a lot. I just ran it and it worked.

    1. Pearce Avatar

      Thanks Karl, would you like to see examples in other languages, or would you prefer more use case examples?

  2. shaveta nayyar Avatar

    i put all code together and included sdk v3-php-sdk-2.0.4, somehow the popup opened on “Connect to QuickBase” is blank. It seems oauth.php file is breaking at $oauth = new OAuth( OAUTH_CONSUMER_KEY, OAUTH_CONSUMER_SECRET, OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_URI);

    Do i need to install anything on server to make it work.. any ideas?

    Thanks!!

    1. Pearce Avatar

      Did you take the code into your own server? If so you need to make sure you install the PECL OAuth, also make sure permissions are set for the temp directory that holds the session data. Make sense?

  3. shaveta n Avatar

    Thanks, it worked!!

  4. Tom Vaughan Avatar

    Link above is dead.

    1. Pearce Avatar

      Hummm. . . seems to be a problem with runnable. I pinged them to see if they can fix the issue.

  5. nlewis Avatar

    Works great, thanks!
    On my own server it was not including the oauth_verifier, so I needed to add it to the parameters passed
    $access_token = $oauth->getAccessToken( OAUTH_ACCESS_URL,null,$_GET[‘oauth_verifier’] );

  6. john.prangerdev1 Avatar

    I have a client who is trying to get this running in their environment but because of hosting issues they are unable to get the PECL extension setup. Is there a possible work around in this situation or are we just out of luck??

    1. Pearce Avatar
      Pearce

      Managed hosts will generally not allow a package like PECL installed. You will need to move/upgrade to a host that will allow it.

  7. sarath pillai Avatar

    Hey is there a post describing how to use the Customer Data App , i used the exmaple php script and is not working am getting error

    code : Code:MissingRequiredField,Type:SYSTEM

    upon curl request to https://financialdatafeed.platform.intuit.com/v1/institutions

  8. matt karikomi Avatar

    thanks Pearce for this great example. i downloaded the code and ran it successfully against my company data with a copy of the sdk2 library. in terms of further support, i would really appreciate some guidance on the sdk itself. im using it to do two things: 1) compose the oauth header of an api request (which seams to fall under the ServiceContext class, and 2) assemble the query which will append the request URI (which seams to fall under the DataService class which offers CRUD methods). my initial priority with this project was to implement this client functionality in javascript for portability. however im not totally clear on the role of either of the above classes. for instance, can you explain the purpose of getXmlFromObj, decorateIntuitEntityToPhpClassName and cleanPhpClassNameToIntuitEntityName? beyond that, is there any more documentation on how to actualy construct the request header so that it contains the oauth creds in every request? thanks in advance, MK

  9. Prabhupada Swain Avatar

    In my case access token is not generating.
    $access_token = $oauth->getAccessToken( OAUTH_ACCESS_URL );
    this is giving me exceptions..

    connection terminated here. Wonder.. why?

Leave a Reply

Your email address will not be published. Required fields are marked *