0

I am building a program that will list albums/folders and images from my Amazon Cloud Drive. I am able to authenticate and get a token by following the instructions here at amazon public apis.

I am having trouble with the next call to get my endpoints described here under Account API.

Using get

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

So my request looks just like this in fiddler and on my site just like it is described on the Amazon site here under Get Endpoint. The only differences is the token for obvious reasons.

Sample Request:

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

My response is:

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

What I am expecting:

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

I did find some information about building the objects in my response from amazon, however, it's not listed in the documentation on the amazon developer site. Is this something new that has not been updated in the docs or am I doing something wrong?

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
dsum27
  • 505
  • 3
  • 12

1 Answers1

1

I had a new line between Authorization: Bearer and my token Atza|IQEBLjAsAhQ5zx7pKp9PCgCy6T1JkQjHHOEzpwIUQM. After removing the new line my issue was fixed..

dsum27
  • 505
  • 3
  • 12