2016-11-27 69 views
2

我目前的任務是訪問來自交通部QCMobile API的數據,位於here訪問QCMobile API

我已經做了一個帳戶,並獲得了我的鑰匙。我試過通過Ajax調用,Node的Request和https模塊來訪問它,現在我只是試圖通過Curl獲得響應。

每當我嘗試訪問它時,我都會得到同樣的錯誤:錯誤403,禁止。

我的URL表現爲正常形成,因爲在這裏看到:

https://mobile.fmcsa.dot.gov/qc/services/carriers/44110/basics?webKey=xxxx 

當我從節點或從Ajax調用運行它,我只得到403,故宮。

這裏是我的相關節點代碼:

this.url = 'https://mobile.fmcsa.dot.gov/qc/services/carriers/' + dotNumber + '/basics' + '?webKey=' + this.webkey; 

this.options = { 
    method: 'GET', 
    uri: this.url, 
}; 

this.getDoTData = function() { 

    request(this.options) 
     .then(function (response) { 
      // Request was successful, use the response object at will 
      console.log(response); 
     }) 
     .catch(function (err) { 
      // Something bad happened, handle the error 
      console.log(err); 
     }); 
} 

當我通過捲曲運行它,我會得到相同的403與一些額外的細節:

curl: (56) SSLRead() return error -9806 

我想知道如果任何人有任何想法至於如果我不正確地訪問這個API。似乎沒有太多的文檔,他們網站上可以提交技術問題的頁面似乎已被打破。

感謝您的任何見解。

回答

2

該Web服務似乎暫時停止運行。這些問題始於11月18日週末的維護時段,從那時起它一直處於不同程度的非操作狀態。

這是我今天從FMCSA客戶的支持得到了響應:

I do apologize about the inconvenience however, we have been experiencing technical difficulties with the App for a few weeks now. Our IT department is currently working on it however, at this time I do not have an exact time on when it will be fixed.

+0

嗯,還好。我覺得有什麼問題。謝謝你讓我知道! –

+1

更新:它現在可用! –