I was able to get Signpost work with QuickBooks Online using HttpPost. However when I tried querying with filters, I got 401 error every time. After contacting support, I was informed that this is a known bug. They pointed me to an example in C#. I am using Signpost oauth library in Java. The C# example doesn't make sense to me since I don't have those functions available in Signpost. Also I don't understand what exactly I need to do.
One side note: I had to use HttpClient for this content type: "application/x-www-form-urlencoded". This is the limitation that comes from Signpost.
Unauthorized OAuth Token: signature_invalid401SERVER
The C# workaround example: https://gist.github.com/IntuitDeveloperRelations/6024616
/* filtering fails with 401 error */
HttpClient client = new DefaultHttpClient();
HttpPost requestHp = new HttpPost("https://qbo.intuit.com/qbo28/resource/accounts/v2/670436015");
requestHp.addHeader("Content-Type", "application/x-www-form-urlencoded");
BasicHttpEntity filter = new BasicHttpEntity();
filter.setContent(new StringInputStream("Filter=Name :EQUALS: Continuing"));
requestHp.setEntity(filter);
CommonsHttpOAuthConsumer consumer = new CommonsHttpOAuthConsumer(getOauthConsumerKey(), getOauthConsumerSecret());
consumer.setTokenWithSecret(getOauthAccessToken(),getOauthAccessTokenSecret());
consumer.sign(requestHp);
HttpResponse response = client.execute(requestHp);
AcctNum is not a valid filter for QBO Account entity.
Ref - https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0400_quickbooks_online/account#Attributes_Supporting_Filtering_and_Sorting
You can use 'Name' attribute as filter.
PFB code snippet
Using java devkit
Endpoint - https://qbo.intuit.com/qbo1/resource/accounts/v2/188712345
Content-Type: application/x-www-form-urlencoded
post data to end point: Filter= Name :EQUALS: BankCharges
Using Signpost
Thanks