簡體   English   中英

Amazon Cloud Drive REST API終端節點

[英]Amazon Cloud Drive REST api endpoint

我正在構建一個程序,該程序將列出我的Amazon Cloud Drive中的相冊/文件夾和圖像。 我能夠進行身份驗證並按照指示獲取令牌這里在亞馬遜的公共API。

我在下次調用時遇到麻煩,以獲取帳戶API下此處描述的端點。

使用獲取

GET : {{metadataUrl}}/account/endpoint  Gets the customer end-point against
which REST queries will be executed.

所以我的要求看起來就像這提琴手和,就像它是在亞馬遜網站描述我的網站在這里下獲取端點。 唯一的區別是令牌有明顯的原因。

Sample Request:

GET /drive/v1/account/endpoint HTTP/1.1
Host: drive.amazonaws.com
Authorization: Bearer
Atza|IQEBLjAsAhQ5zx7pKp9PCgCy6T1JkQjHHOEzpwIUQM

我的回答是:

{  
"message":"Authorization header requires 'Credential' parameter.
Authorization header requires 'Signature' parameter. 
Authorization header requires 'SignedHeaders' parameter. 
Authorization header requires existence of either a 'X-Amz-Date' 
or a 'Date' header. Authorization=Bearer"
}

我期望的是:

{
"customerExists": true,
"contentUrl": "https://content-na.drive.amazonaws.com/cdproxy/",
"metadataUrl": "https://cdws.us-east-1.amazonaws.com/drive/v1/"
}

我確實從Amazon的響應中找到了一些有關構建對象的信息,但是,亞馬遜開發者網站上的文檔中未列出這些信息。 這是文檔中尚未更新的新內容嗎,還是我做錯了什么?

在授權之間有一個新的界線:不記名和我的代幣Atza | IQEBLjAsAhQ5zx7pKp9PCgCy6T1JkQjHHOEzpwIUQM。 刪除新行后,我的問題已解決。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM