我正在开发移动应用程序 (android)。我想使用 REST API 或 SDK 在 IoT 中心注册新设备。注册过程将由移动应用程序完成。对于前智能手环。 谷歌上的大多数可用链接都显示了创 build 备的 azure CLI 流程。但我想使用 REST API 以编程方式创建新设备。
我们可以使用设备提供服务来注册新设备吗?
我是 Azure 服务的新手。
最佳答案
您可以按照 Service - Create Or Update Device 在 IoT 中心的身份注册表中创建或更新设备的身份。 .
PUT https://fully-qualified-iothubname.azure-devices.net/devices/{id}?api-version=2019-07-01-preview
Authorization: Token
{
"deviceId": "{device id}"
}
如何获取Token
,请引用Authentication .
关于java - 如何使用 REST Api 在 IoT 中心注册新设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61678549/