简体   繁体   中英

Connect via AMQP to Azure IoT hub

I use Azure IoT HUB and I want connect to device and send/receive messages.

First of all I generate SaS token and connect to IoT HUB.

After this I create new device: create new certificate get thumbprint and set this thumbprint to new device.

At last I use certificate and connect to device via AMQP. But get error after attaching:

amqp:unauthorized-access

In attach packet target address is "devices/{device-id}/messages/events"

What's wrong? Why I get this error?

Most likely your passing the SaS token incorrectl. What language are you using? Are you using preexisting library or are you trying to implement AMQP by hand?

Have a look at this post for pretty good documentation, library sources can be found here .

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