How do I connect to the online beta via python?

I'm trying to figure out how to authenticate and create an entry in quickbooks via Python. Currently, when I try to click the auth link in my API , I get a 404 page.

What I am trying to do is create an invoice via Python. However, it looks like their documentation is incomplete. I have contacted their support and I have not heard from them yet.

+3


source to share


5 answers


This library will do the job https://github.com/HaPsantran/quickbooks-python

It works in JSON, so you can build a docs-based Invoice at https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/030_entity_services_reference/invoice using JSON examples.

The library does not support sandbox mode, so if you are going to use the key and private key for development, you will change this code.

base_url_v3 =  "https://quickbooks.api.intuit.com/v3"

      



to

base_url_v3 =  "https://sandbox-quickbooks.api.intuit.com/v3"

      

in this mode.

** Sandbox mode is only currently applied to UBO in the US.

+1


source


The python-quickbooks library is probably the right choice as it is a "complete rewrite of quickbooks-python". It has fairly complete instructions on how to get and use auth keys, although I wouldn't call it "simple" as the process is by definition a bit complex. The instructions are "for Django", but the Django-specific code just gets the parameters from the URL string.

We use it to great effect because the syntax is as simple as:



QuickBooks(
    consumer_key=CLIENT_KEY # from quickbooks website
    ,consumer_secret=CLIENT_SECRET # from quickbooks website
    ,access_token=ACCESS_TOKEN # from auth url callback
    ,access_token_secret=ACCESS_TOKEN_SECRET # from auth url callback
    ,company_id=REALM_ID # from auth url callback
    #,sandbox=True
)

account = Account.get(qbid) # qbid can be retrieved from the AccountList
return account.CurrentBalance

      

+1


source


After writing a lot the module @Minimul mentions - with a very helpful start simonv3 figuring out how to get it to work first and then I just built it - I'm pretty sure this wo n't support the oauth workflow request token asking the user for out of range authentication and then getting and saving the access token. This assumes you already have an access token.

Simon (or another Python developer) can comment on how he gets the access token from Python, and if so, it would be great if he (or they) can add it to the module for everyone to enjoy.

0


source


I had the same problem. I just figured it out and put a step by step process here:

python with Quickbooks Online v3 API

Hope it helps.

0


source


I looked at the existing python quickbook clients and found that they are either outdated or don't have all the features. So I created a new python client for quickbooks which can be found at https://pypi.python.org/pypi/quickbooks-py

0


source







All Articles