I'm trying to create a queue on Azure cloud. I've an Azure account, namespace and using Service Bus. Due to some restrictions I need to do it using RAW GET/PUT requests so I'm using Simple REST Client.
These are the values mentioned in REST client fields:
URL
https://mynamespace-ns.servicebus.windows.net/
Method
PUT
Headers
PUT /testqueue?timeout=30 HTTP/1.1
x-ms-date: Fri, 25 Sep 2015 03:16:12 GMT
x-ms-version: 2009-09-19
Authorization: SharedKey mynamespace-ns:oucfev8CXZPMsli4t7iZJ+nlC0fUwasyPH5OdSqi9po=
Host: mynamespace-ns.servicebus.windows.net
Content-Length: 0
This is how I'm generating the Authorization key:
HmacSha256 encoding the string "PUT\n\n\n\n0\n\n\n\n\n\n\n\nx-ms-date:Fri, 25 Sep 2015 03:16:12 GMT\nx-ms-version:2009-09-19\n/mynamespace-ns" with secret key is the SharedAccessKey copied from Connection Information page on Azure Portal. After that Base64Encode the resulted string.
Every-time I send the request I got the following response:
401
MalformedToken: Invalid authorization header: The request is missing WRAP authorization credentials. TrackingId:8d52cae0-0dba-470d-8db2-3e76d4fd4d0b_G27,TimeStamp:9/25/2015 9:45:17 AM
Can anyone please tell what I'm missing or am I doing something wrong?