Closed Oliv4945 closed 4 years ago
It looks like the AppEUI/DevEUI combination is already taken by another device in this NetworkServer. That device seems to be registered in hivemind_dev_1
, and you indeed don't have permission to update it.
Hi,
What is surprising is that I can register the device with same AppEui/DevEui in the console, but not the API
I am facing the same problem (using node.js, but don't matter). Tried generating different AppEuis and DevEuis, all with permission denied: No "devices" rights to Application "ttn-tools"
-also not mine. register in web console works with same parameters.
BTW: why is this closed? No solution yet. https://www.thethingsnetwork.org/forum/t/no-devices-rights-to-application/20383 https://www.thethingsnetwork.org/forum/t/failed-to-register-device-no-devices-right-to-application-xxx/28597/8
I was facing the same problem: could register the device just fine in the console, but got this error through the API. Using the console to change the handler for the application over from ttn-handler-eu
to digitalcatapult-uk-handler
fixed it for me.
EDIT: apparently digitalcatapult just does less error checking; the call I was doing ended up making devices with empty DevEUI, empty AppEUI, etc, because the JSON format I was supplying was incorrect. Make sure to use the spec in https://www.thethingsnetwork.org/docs/applications/python/api-reference.html#register_device . It seems that the documentation on pypi is outdated and specifies a different format. The JSON you have to supply is significantly different from the format you get back when requesting devices! E.g. you have to use devEui
in stead of dev_eui
and it is at the top level in stead of inside a lorawan_device
field. Seems this error just occurs if you're supplying invalid JSON to the TTN handler.
This is a bug report for the backend
Add a device to an application thanks to HTTP API
Do a
POST
request tohttp://eu.thethings.network:8084/applications/my_app_id/devices/my_dev_id
with contentAnswer is
permission denied
, alsohivemind_dev_1
is not my app_idIf think that my request is ok as I get the right answer when I manually create the device in the console and do a
GET
request tohttp://eu.thethings.network:8084/applications/my_app_id/devices/my_dev_id
. My application key has all rights selected in the web console