Question

When I perform a search by LastUpdatedTime I get "401 Unauthorized Error". Query by CustomerId works fine

Here is my code:

var pq = new PaymentQuery()
{
    LastUpdatedTime = new DateTime(2012,12,21),
};

pq.SpecifyOperatorOption(Intuit.Ipp.Data.Qbo.FilterProperty.LastUpdatedTime, FilterOperatorType.AFTER);
var list = pq.ExecuteQuery<Payment>(commonService.ServiceContext);

Application throws Intuit.Ipp.Exception.InvalidTokenException in ExecuteQuery

Was it helpful?

Solution

The SDK does not encode the datetime correctly, so you will need to use DevDefined and deserialize the response with the SDK. Code sample: https://gist.github.com/IntuitDeveloperRelations/6024616

OTHER TIPS

What does the full error look like? Are you able to do other calls fine with this company using the token sets & realm ID that you have in place?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top