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