2013-01-24 14 views
2

使用c#devkit對qbo。當我離開昨天一切都工作,但是今天試圖初始化我的測試應用程序中的servicecontext我開始得到「Intuit.Ipp.E​​xception.InvalidTokenException:未經授權」的錯誤。Initializer.cs中的InitializeServiceContext已開始在我的測試應用程序中拋出「Unauthorized」

ServiceContext context = Initializer.InitializeServiceContext(oauthValidator, realmId, string.Empty, string.Empty, dataSourcetype); 

和誤差是在這裏的InitializeServiceContext: 上下文=新ServiceContext(oauthValidator,realmId,intuitServiceType);

我昨天在我的測試公司註冊(即我現在有一個付費的快速在線賬戶)我是不是可以繼續測試一個真實賬戶?或者我在某個地方犯了一個更大的錯誤。

感謝

編輯:

當試圖登錄到上忒開發遊樂場,我發現了以下錯誤我的測試程序:

Oops! An error has occurred. 

Please close this window and try again. 

Error Code: internal_error 
Message: Error Authorizing Request Token: <redacted-token> 

回答

3

您的OAuth令牌不再有效。初始化QBO的ServiceContext對象將檢索該領域的基本URL,這需要授權並因此引發未經授權的錯誤。

+3

問題解決。 我沒有充分閱讀文檔。 我仍在使用示例代碼中的OauthAccessTokenStorage.xml,該示例代碼並未過期oAuth標記。 感謝您的幫助 – safetyOtter

相關問題