0

I registered a device using the api and now I see this:

How do I move from WAITING_ON_CONNECTION to a different state?

Update

When I do the following:

curl -v -u bob@iotthings.com:iotthings \ -H 'Accept: application/vnd.com.nsn.cumulocity.deviceCredentials+json; charset=UTF-8; ver=0.9' \ -H 'Content-type: application/vnd.com.nsn.cumulocity.deviceCredentials+json; charset=UTF-8; ver=0.9' \ -X POST \ -d '{"id":"0000000017b769d5"}' \ http://iotthingscumulocity.cumulocity.com/devicecontrol/deviceCredentials/

I get a 403 status.. with this text:

{"error":"security/Forbidden","info":"https://www.cumulocity.com/guides/reference-guide/#error_reporting","message":"Access is denied"}%

I know I do not have any auth problems, because the following works fine and I get the device on the dashboard:

curl -v -u Imran@iotthings.com:iotthings \ -H 'Accept: application/vnd.com.nsn.cumulocity.managedObject+json; charset=UTF-8; ver=0.9' \ -H 'Content-type: application/vnd.com.nsn.cumulocity.managedObject+json; charset=UTF-8; ver=0.9' \ -X POST \ -d '{"c8y_IsDevice":{},"name":"77889"}' \ http://iotthingscumulocity.cumulocity.com/inventory/managedObjects

So.. Is there anything I need to do to avoid getting the 403 error? I started with the normal permissions for a demo account, and I added all other permissions as well - I still keep getting the 403.

Trewq
  • 3,187
  • 6
  • 32
  • 50

1 Answers1

0

A client needs to query for the credentials using the bootstrap user. Once that happened the entry can be accepted and afterwards if the device queries again it will get the credentials.

http://cumulocity.com/guides/rest/device-integration/#step-0-request-device-credentials

TyrManuZ
  • 2,039
  • 1
  • 14
  • 23
  • Thanks @tyrmanuz I update the question, and appreciate the reply. – Trewq Feb 19 '18 at 18:55
  • For this request there is a special user as described in the guide. You can only execute this request with this "devicebootstrap" user. You can ask for it contacting Cumulocity support. – TyrManuZ Feb 20 '18 at 13:50