【问题标题】:QBO Payment Query returns 'unauthorized'QBO 支付查询返回“未授权”
【发布时间】:2013-01-28 17:59:35
【问题描述】:

当我按 LastUpdatedTime 执行搜索时,我得到“401 Unauthorized Error”。按 CustomerId 查询工作正常

这是我的代码:

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);

应用程序在 ExecuteQuery 中抛出 Intuit.Ipp.E​​xception.InvalidTokenException

【问题讨论】:

    标签: intuit-partner-platform quickbooks-online


    【解决方案1】:

    SDK 未正确编码日期时间,因此您需要使用 DevDefined 并使用 SDK 反序列化响应。代码示例:https://gist.github.com/IntuitDeveloperRelations/6024616

    【讨论】:

    • 我的令牌很好。我可以执行许多其他查询,例如提到的 PaymentQuery,但使用 CustomerId 作为参数。
    【解决方案2】:

    完整的错误是什么样的? 您是否可以使用您拥有的令牌集和领域 ID 与该公司进行其他通话?

    【讨论】:

    • 是的,我可以进行任何其他调用 - 正如我所写的,我可以只使用 CustomerID 作为参数执行查询,我可以获得排序结果。
    • 完整错误没有任何附加信息 - 只有“401 Unauthorized Error”作为消息
    猜你喜欢
    • 1970-01-01
    • 2015-07-15
    • 2020-03-02
    • 2013-01-19
    • 2014-08-22
    • 2015-02-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多