At the Step 3 of the 'Read the telemetry from your Hub' topic, i tried to do the instruction quoted, but the following error appeared:
PS C:UsersSTD> cd C:UsersSTDazure-iot-samples-node-masteriot-hubQuickstartsread-d2c-messages
PS C:UsersSTDazure-iot-samples-node-masteriot-hubQuickstartsread-d2c-messages> npm install
audited 458 packages in 1.981s
found 0 vulnerabilities
PS C:UsersSTDazure-iot-samples-node-masteriot-hubQuickstartsread-d2c-messages> node ReadDeviceToCloudMessages.js
'sharedAccessKeyName' is a required property of the ConnectionConfig.
How can i fix it?
I tried do found that parameter in the .js file but it doesn't exist, i think.
Thanks.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi @CaioCPSilva On step 2. Open the ReadDeviceToCloudMessages.js have you replaced the connectionString variable with a connection string that looks like this?
HostName={YourIoTHubName}.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey={YourSharedAccessKey}
I'm trying to make sure the connection string has the ShareAccessKeyName
Hi @Alberto-Vega-MSFT!
Based on your answer, my connectionString doesn't have the "SharedAccessKeyName" as a parameter.
Can i insert this manually in the ReadDeviceToCloudMessages.js archive?
Thanks for your help!!
Hi @Alberto-Vega-MSFT !!
I found the problem with the connectionString.
I was using the IoT device's connectionString, and i should have used the connectionString of the Shared access policies in my IoT Hub.
Thank you for your time and support!!
gracias , me arreglaron el dia :)
Most helpful comment
Hi @Alberto-Vega-MSFT !!
I found the problem with the connectionString.
I was using the IoT device's connectionString, and i should have used the connectionString of the Shared access policies in my IoT Hub.
Thank you for your time and support!!