简体   繁体   中英

How to configure Azure IOT central with ReadyApi

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

在 Azure 物联网中心

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?

在此处输入图片说明

next question is: and how do you know which one to choose? https://docs.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? 在此处输入图片说明

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

According to https://docs.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".

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM