Problem to create header to Authentication


  • Hello,

    I am trying to create the Request Header, to PUT a blob in Azure Storage. And until now, no success.

    I am using the Block Blob, version 2015-02-21. And I am a little confused with the struture of header.

    Any help or Tips?


    Saturday, May 7, 2016 12:03 AM

All replies

  • Hello Gustavo,

    Thank you for posting here!

    1. Are you referring to any documentation for the steps?
    2. Do you get any error message? If yes, what is the exact error message you receive?

    If you haven’t checked this already, you may refer the section “
    Sample Request” in the link below,

    You would need to define a request header (x-ms-blob-type) for blob type and set its value to BlockBlob. Also for Put requests you would need to define the Content-Length request header as well. Reference


    Saturday, May 7, 2016 3:36 PM
  • Hello,

    Thank you for replay!

    - Yes I am referring to Put Blob msdn documentation
    - The error was "Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature".

    This is my string to sign:
    PUT\n\n\n4903\n\n\n\n\n\n\n\n\nx-ms-blob-type:BlockBlob\nx-ms-date:Fri, 06 May 2016 16:37:37 GMT\nx-ms-version:2009-09-19\n/<myAccount>/<myContainer>/<nameOfmyBlob>\

    Obs: I am working with nodejs.

    Monday, May 9, 2016 8:21 PM
  • Hello,

    Why did you not added a storage account key to your request headers? please add storage account key and try again.

    The following example shows a request to create a block blob:

    Request Syntax: PUT HTTP/1.1

    Request Headers:

     x-ms-version: 2015-02-21

    x-ms-date: <date>

    Content-Type: text/plain; charset=UTF-8

    x-ms-blob-content-disattachment; filename="fname.ext"

    x-ms-blob-type: BlockBlob x-ms-meta-m1: v1

    x-ms-meta-m2: v2

    Authorization: SharedKey myaccount:YhuFJjN4fAR8/AmBrqBz7MG2uFinQ4rkh4dscbj598g=

    Content-Length: 11

    Request Body: hello world.

    Are you using REST API or Node.js to put a blob in to a container?

    If you are working with Node.js refer given link for more details:


    Vikranth S.

    If a post answers your question, please click Mark as Answer on that post and Vote as Helpful.

    Tuesday, May 10, 2016 8:32 AM