Volatil3
Volatil3

Reputation: 14978

Python Quickbooks: Unable to get correct authorization URL

I am using Python Quickbooks3 library to connect with QBO. I am doing as given in example but not getting correct URL. Below is my code:

from quickbooks import QuickBooks

clientkey = "qyprdLl476vKE74vVDP99Rl08gn1fr"
clientsecret = "nYFWsjeVspmNBQoIaIfPDABblYYBeX8SAhpDTMXY"

client = QuickBooks(
    sandbox=True,
    consumer_key=clientkey,
    consumer_secret=clientsecret,
    callback_url='http://localhost/qbo_token.php'
)

authorize_url = client.get_authorize_url()
request_token = client.request_token
request_token_secret = client.request_token_secret

print(authorize_url,request_token,request_token_secret)

It prints:

('https://appcenter.intuit.com/Connect/Begin?oauth_token=true', u'true', u'Ua3e7ZzPdac98RAZ1PSQJ6fjOEb9COiFDbdEQUdW')

Also, I want to skip browser based authorization as it would only be me using app. How can I do that?

Upvotes: 0

Views: 176

Answers (1)

Keith Palmer Jr.
Keith Palmer Jr.

Reputation: 27952

Lots of questions here. For starters:

callback_url='http://localhost/qbo_token.php'

If you're using Python, why are you pointing to .php script for OAuth?

Are you sure you're using your sandbox OAuth consumer key and secret?

Also, I want to skip browser based authorization as it would only be me using app. How can I do that?

You can't skip it.

Upvotes: 1

Related Questions