title: Create registration for Azure Notification Hub in Postman
body: <p>I created a Service Bus / Notification Hub in my Azure Portal.</p>
  
  <p>Now I'm trying to use the Azure REST API with <strong>Postman</strong> based on this doc :
  <a href="https://msdn.microsoft.com/en-us/library/azure/dn223265.aspx" rel="noreferrer">https://msdn.microsoft.com/en-us/library/azure/dn223265.aspx</a></p>
  
  <p>Here is the Postman configuration I have :</p>
  
  <p>It's a <strong>POST</strong> method of the following url (<em>Create Registration</em>)
  <a href="https://mysite.servicebus.windows.net/mysite-notif/registrations/?api-version=2015-01" rel="noreferrer">https://mysite.servicebus.windows.net/mysite-notif/registrations/?api-version=2015-01</a>
  (I replaced with <em>mysite</em> in that url for privacy reasons)</p>
  
  <p>In the <strong>Headers</strong>, I typed 2 entries :</p>
  
  <p><strong>Content-Type</strong>
  application/atom+xml;type=entry;charset=utf-8</p>
  
  <p><strong>Authorization</strong>
  Endpoint=sb://[mysite].servicebus.windows.net/;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=[mykey]
  (this Connection information I copied from the Azure portal)</p>
  
  <p>In the <strong>Body</strong>, I chose <em>raw - XML(txt/xml)</em> and pasted :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;entry xmlns="http://www.w3.org/2005/Atom"&gt;
      &lt;content type="application/xml"&gt;
          &lt;WindowsRegistrationDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect"&gt;
              &lt;Tags&gt;myTag, myOtherTag&lt;/Tags&gt;
              &lt;ChannelUri&gt;{ChannelUri}&lt;/ChannelUri&gt;
          &lt;/WindowsRegistrationDescription&gt;
      &lt;/content&gt;
  &lt;/entry&gt;
  </code></pre>
  
  <p>(it's the Native registration for Windows Notification Service example)</p>
  
  <p>When I send this call from within Postman, I get a <strong>401 Error</strong> :</p>
  
  <pre><code>&lt;Error&gt;
      &lt;Code&gt;401&lt;/Code&gt;
      &lt;Detail&gt;MalformedToken: The credentials contained in the authorization header are not in the WRAP format..TrackingId:ee0d87ef-6175-46a1-9b35-6c31eed6049d_G2,TimeStamp:8/13/2015 9:58:26 AM&lt;/Detail&gt;
  &lt;/Error&gt;
  </code></pre>
  
  <p>What am I missing ?
  Is it the Authorization tab I left on "No Auth" in Postman ?
  Is it the value of the Authorization header that should be encoded like shown here ?
  <a href="https://stackoverflow.com/questions/31292156/creating-registration-id-for-azure-notification-hub-via-rest-api">Creating registration ID for Azure Notification Hub via REST api</a></p>
  
  <p>Thanks.</p>