Amazon Cloud Drive REST api 端点

问题描述 投票:0回答:1

我正在构建一个程序,它将列出我的亚马逊云驱动器中的相册/文件夹和图像。我可以按照亚马逊公共 apis here 中的说明进行身份验证并获取令牌。

我在下一次调用帐户 API 下here 描述我的端点时遇到问题。

使用获取

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

所以我的请求在 fiddler 中看起来就像这样,在我的网站上就像在亚马逊网站here Get Endpoint 下描述的那样。唯一的区别是令牌,原因很明显。

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/"
}

我确实在亚马逊的回复中找到了一些关于构建对象的信息,但是,它没有列在亚马逊开发者网站的文档中。这是文档中没有更新的新内容还是我做错了什么?

api rest amazon-clouddrive
1个回答
1
投票

我在 Authorization: Bearer 和我的 token Atza|IQEBLjAsAhQ5zx7pKp9PCgCy6T1JkQjHHOEzpwIUQM 之间换了一行。删除新行后,我的问题得到解决..

© www.soinside.com 2019 - 2024. All rights reserved.