1
,而试图在Intuit公司使用过滤器我收到“未经授权”的错误给未经授权的错误:BillQuery用于获取票据忒
异常详细信息:Intuit.Ipp.Exception.InvalidTokenException:未经授权
下面的代码被用于建立服务上下文:
string AppToken = ConfigurationManager.AppSettings["applicationToken"].ToString(CultureInfo.InvariantCulture);
String realmId = HttpContext.Current.Session["realm"].ToString();
String accessToken = HttpContext.Current.Session["accessToken"].ToString();
String accessTokenSecret = HttpContext.Current.Session["accessTokenSecret"].ToString();
String consumerKey = ConfigurationManager.AppSettings["consumerKey"].ToString(CultureInfo.InvariantCulture);
String consumerSecret = ConfigurationManager.AppSettings["consumerSecret"].ToString(CultureInfo.InvariantCulture);
IntuitServicesType intuitServiceType = (IntuitServicesType)HttpContext.Current.Session["intuitServiceType"];
OAuthRequestValidator oauthValidator = new OAuthRequestValidator(accessToken, accessTokenSecret, consumerKey, consumerSecret);
context1 = new ServiceContext(oauthValidator, AppToken, realmId, IntuitServicesType.QBO);
查询检索的最后修改帐单是如下:
List<Bill> CustomerBills = billQry.ExecuteQuery<Bill>(context1).ToList<Bill>();
请让我知道,我通过错误的参数值。
我也一样,但仍面临同样的未经授权的问题。 – 2013-03-08 04:44:40
您使用的是什么版本的DevKit?另请发布请求/响应XML(http://docs.developer.intuit.com/0025_Intuit_Anywhere/0200_DevKits/0100_IPP_.NET_DevKit/0600_Logging)。 – 2013-03-08 14:31:36
您好,我正在使用IPP .NET DevKit 2.0请求XML筛选器= LastUpdatedTime:AFTER:2013-02-19T16:28:39 + 05:30:AND:LastUpdatedTime:BEFORE:2013-03-11T16:28:40 + 05 :30&Sort = LastUpdatedTime HighToLow&PageNum = 1&ResultsPerPage = 15响应XML:<?xml version =“1.0”encoding =“UTF-8”standalone =“yes”?>; 未经授权的OAuth令牌:signature_invalid SERVER –
2013-03-11 11:03:48