How to configure Azure IOT central with ReadyApi

125 views Asked by At

We are using ourname.azureiotcentral.com/ and ReadyApi 3.5.0

in Azure iot central

An access token we created on the azureiotcentral website looks like this:

SharedAccessSignature sr=739023aa-a2d4-4cc1-8044-0447586f622a&sig=teSPECIMENmawBMI0QUA5b%2BJ%2BDdhuie7JSTA%2BggltI0E%3D&skn=specimen&se=1635585779999

Now back in ReadyApi, which one do we choose as authentication?

enter image description here

next question is: and how do you know which one to choose? https://learn.microsoft.com/nl-nl/rest/api/iotcentral/devices/getcredentials

asuming it is ... OAuth 2.0 (Azure)

Then how do you know the profile name?

and is the token started from the SharedAccess part or before the sr= or only the part after the sr=? and why is there a spacebar in the token? (in short: how to format?)


I tried this: But then the respons is something with cookies. How do I know what browser is tested/tried? enter image description here

(today: A colleague told me he thought it was the bearer option)

2

There are 2 answers

0
Scott McNeany On

According to https://learn.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/3-exercise-authorize-api, the shared access signature goes in the "Authorization" header as-is without the "Bearer" prefix. I'm not sure what option that corresponds to in ReadyApi, but it might be easier to remove the authentication option and just add it manually as a header named "Authorization".

0
tijnn On

enter image description here

in the field VALUE you paste the complete token, including "SharedAccessSignature" and including the spacebar before the sr=! (and yes without the Bearer, thanks Scott) that's it.