title: Quickbooks v3 query url returning Error
body: <p>First - my question:</p>
  
  <p>When accessing the Quickbooks API, v3 (as has been forced on me as of this weekend by Intuit) I am trying to access Journal Entries (but the following problem persists across any other query) and I'm trying to use the prescribed query?query=SELECT * FROM JournalEntry (what?). </p>
  
  <pre><code>https://qb.sbfinance.intuit.com/v3/company/&lt;id&gt;/query?query=SELECT * FROM JournalEntry
  </code></pre>
  
  <p>I get as result:</p>
  
  <pre><code>{"Fault":{"Error":[{"Message":"message=Exception authenticating OAuth; errorCode=003200; statusCode=401","code":"3200"}],"type":"AUTHENTICATION"},"requestId":"6f5e5f14af7d4867ad0d8f639ade7d04","time":"2013-11-12T16:10:44.724Z"}
  </code></pre>
  
  <p>Which, yes, tells me that there was an error with authentication. However, when I access a URL that doesn't include this ridiculous query syntax, everything works fine:</p>
  
  <pre><code>https://qb.sbfinance.intuit.com/v3/company/&lt;id&gt;/journalentry/&lt;id&gt;
  </code></pre>
  
  <p>I had a similar error when accessing the v2 API, and that was bad formatting on my part, but I don't see what's wrong with my query.</p>
  
  <p>And because my code for generating the authentication tokens etc is identical for both types of request, I doubt that the problem is with how I'm authenticating. Similarly "exception" tells me that there's something going wrong that the API isn't identifying. Probably a formatting of the URL that is going wrong. </p>
  
  <p>I've tried replacing the query URL spaces with both a '+' and a '%20', which returns the same error.</p>
  
  <p>I'm using python and rauth. The code works fine for v2 (but that was deprecated over the weekend without warning, and now is no longer documented).</p>
  
  <p>As a bonus, and because apparently this is Intuit's primary mode of communication with their clients: I'm shocked that Intuit no longer has private support tickets available on their website, and that they rely on a community environment like SO to provide support. The least they could do is provide their own support. Especially if we're paying for use of the API. This is absolutely shocking.</p>
  
  <p>On top of that, the API returns inconsistent responses (the same request will return an error or a valid result, depending on... no change at all). An error I have reported through their support tickets, and they have duly ignored. </p>
  
  <p>Oh, and the documentation says to use </p>
  
  <pre><code>https://quickbooks.api.intuit.com/v3/v3/company/companyID/query?query=selectStmt
  </code></pre>
  
  <p>while the API Explorer uses:</p>
  
  <pre><code>https://qb.sbfinance.intuit.com/v3/company/&lt;id&gt;/query?query=SELECT * FROM JournalEntry
  </code></pre>
  
  <p>Anyone know which one I should actually use? </p>
  
  <p><strong>Edit</strong></p>
  
  <p>For the response that is failing, my request headers are:</p>
  
  <pre><code>{
      'Content-Length': u'62',
      'Accept-Encoding': 'gzip,
      deflate,
      compress',
      'accept': 'application/json',
      'User-Agent': 'python-requests/1.2.3CPython/2.7.5Darwin/13.0.0',
      'Content-Type': 'application/x-www-form-urlencoded',
      'authorization': 'OAuthrealm="&lt;companyId&gt;",
      oauth_nonce="3ad98c5f71bc9f102cc31ac9815cb6d08994454e",
      oauth_timestamp="1384280420",
      oauth_consumer_key="&lt;consumerKey&gt;",
      oauth_signature_method="HMAC-SHA1",
      oauth_version="1.0",
      oauth_token="&lt;oauthToken&gt;",
      oauth_signature="&lt;oauthSignature"'
  }
  </code></pre>
  
  <p>My url is:</p>
  
  <pre><code>https://quickbooks.api.intuit.com/v3/company/&lt;id&gt;/query?query=SELECT+*+FROM+JournalEntry&amp;
  </code></pre>
  
  <p>And my response headers are: </p>
  
  <pre><code>{'content-length': '227', 'server': 'Apache/2.2.22 (Unix)', 'connection': 'close', 'date': 'Tue, 12 Nov 2013 18:20:20 GMT', 'content-type': 'application/json;charset=ISO-8859-1', 'www-authenticate': 'OAuth oauth_problem="signature_invalid"'}
  </code></pre>
  
  <p>My signature hashing function is correct. It's the standard function used by <a href="https://rauth.readthedocs.org/en/latest/api/#oauth-1-0-sessions" rel="nofollow">Rauth</a>, and works fine for more standard API calls (that don't have spaces or SQL select queries in them).</p>