我正在Salesforce中創建一個與iOS客戶端進行通信的web服務。客戶端已經通過驗證並收到令牌。該應用程序將調用Web服務作爲接收數據。以系統管理員身份登錄後,該應用程序可以順利運行。然而,作爲一個標準用戶登錄時,應用程序失敗,出現以下錯誤:Salesforce Web服務失敗
2012-08-06 08:44:13.827 myApp[74075:fb03] Request Failed with Error: Error Domain=com.alamofire.networking.error Code=-1011 "Expected status code in (200-299), got 403" UserInfo=0x8246410 {NSErrorFailingURLKey=https://xxxx-full.cs3.my.salesforce.com/services/apexrest/mobileServices/v1/SystemDataRecords, NSLocalizedDescription=Expected status code in (200-299), got 403}, {
NSErrorFailingURLKey = "https://xxxx--full.cs3.my.salesforce.com/services/apexrest/mobileServices/v1/SystemDataRecords";
NSLocalizedDescription = "Expected status code in (200-299), got 403";
}
顯然,這讓我覺得,它是與資源共享模式。但是,如果標準用戶直接在salesforce.com上登錄時嘗試提取相同的數據,則不存在任何問題。
有什麼想法?
403是一個禁止狀態代碼,因此它正在被阻止。 – DaveHogan 2012-08-06 13:56:47