I am having problems with authentication when trying to access my Windows Azure Storage Account via the REST Api.
I have read the following resources to determine how to generate the request:
http://msdn.microsoft.com/en-us/library/windowsazure/dd179428.aspx
http://convective.wordpress.com/2010/08/18/examples-of-the-windows-azure-storage-services-rest-api/
Azure Blob Service REST API returns 403 error: "Request date header not specified"
From my understanding there are only 4 variables in the request: The actual URI to determine the service endpoint, The current date in GMT time The Primary Access Key The account name.
I have the first two from the MSDN resources and the other two from my Windows Azure Portal.
GET http://<account_name>.table.core.windows.net/ HTTP/1.1 x-ms-date: Sun, 24 Feb 2013 09:19:31 GMT x-ms-version: 2009-09-19 Authorization: SharedKey <account_name>:<primary_key> Accept-Charset: UTF-8 Accept: application/atom+xml,application/xml DataServiceVersion: 1.0;NetFx MaxDataServiceVersion: 1.0;NetFx Host: <account_name>.table.core.windows.net
I checked to ensure account name and primary key are correct and that the x-ms-date timestamp is within 15 minutes based on the suggestion from the other post.
I receive the following response:
HTTP/1.1 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
Content-Length: 437
Content-Type: application/xml
Server: Microsoft-HTTPAPI/2.0
x-ms-request-id: d78c2c11-8699-4737-9592-82813eac356e
Date: Sun, 24 Feb 2013 21:20:03 GMT
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>AuthenticationFailed</code>
<message xml:lang="en-US">Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
RequestId:d78c2c11-8699-4737-9592-82813eac356e
Time:2013-02-24T21:20:03.2036675Z</message>
</error>
Any suggestions on fixing the request to Authenticate properly?
Also, I was able to download the Azure Storage Explorer utility and access the service that way so I know the Storage Account is valid and working.