I'm testing the API using the Rest tool Chrome client to validate that the POST request I make is right in order to use it in a Java application. My request is in the following format:
POST /androidhub/publishers/android/messages?timeout=60&api-version=2014-01
HTTP/1.1 HOST: androidhub-124.servicebus.windows.net
authorization: SharedAccessSignature sr=androidhub-124.servicebus.windows.net&sig=mykeySAS=&se=146480684&skn=RootManageSharedAccessKey
content-type: application/json, application/atom+xml;type=entry;charset=utf-8
content-length: 45 { "DeviceId":"dev-01", "Temperature":"37.0" }
But I have the following error.
<Error>
<Code>401</Code>
<Detail>ExpiredToken: . TrackingId:2f6d284e-d7d2-4c9c-81a5-79c542ce8eee_G7, SystemTracker:androidhub-124.servicebus.windows.net:androidhub/publishers/android/messages, Timestamp:5/25/2016 7:13:33 PM</Detail>
</Error>
The key was regenerated before I used it. How I can I not get that error or make the request without putting the time of expiration of the key?
Thank you