ej2 / python-quickbooks

A Python library for accessing the Quickbooks API.
MIT License
402 stars 194 forks source link

Can't fetch data from a live QBO account. errorCode=003100, statusCode=500 #106

Closed maicat11 closed 6 years ago

maicat11 commented 6 years ago

Hello, I have been able to fetch (get) info such as taxAgency, taxRate, invoice, customers from my sandbox which is in OAuth2. However, when I switch over to fetching this same data from a live QBO account which is in OAuth1, I keep getting the same error message:

QuickbooksException: Error returned with status code '500': {"warnings":null,"intuitObject":null,"fault":{"error":[{"message":"message=InternalServerError; errorCode=003100; statusCode=500","detail":null,"code":"3100","element":null}],"type":"SERVICE"},"report":null,"queryResponse":null,"batchItemResponse":[],"attachableResponse":[],"syncErrorResponse":null,"requestId":null,"time":1519164488680,"status":null,"cdcresponse":[]}

Here is how I set up my session:

from quickbooks import Oauth1SessionManager
from quickbooks.objects.customer import Customer

my_session_manager = Oauth1SessionManager(
    sandbox=False,
    consumer_key = "consumerKey",
    consumer_secret = "consumerSecret",
    access_token = "access_token", 
    access_token_secret = "access_token_secret"
)

client = QuickBooks(
     sandbox=False,
     session_manager = my_session_manager,
     company_id = "realm_id"   
 )

customers = Customer.all(qb=client)
print(customers)

I have found nothing out there (including the QBO developer site) that has been useful in helping me debug this. Does anyone have any ideas? Am I setting something up wrong? Thank you!

maicat11 commented 6 years ago

Never mind here. I was not informed that the keys I was using were encrypted until today. No surprise why there were not working. Thanks anyway!