No "devices" rights to Application


(Mark Ruys) #1

We’ve used the API for some time to provision devices to our TTN application. Today I noticed it did not work anymore. This is a call with Curl:

$ curl -X POST http://eu.thethings.network:8084/applications/XXXXX/devices/aaaaaaa -H “Authorization: Key …” -d ‘{“lorawan_device”: {“dev_id”: “aaaaaaa”, “dev_eui”: “008000000xxxxxxx”, “app_key”: “…”, “app_eui”: “70cccccc0000000”, “app_id”: “XXXXX”, “activation_constraints”: “local”, “uses32_bit_f_cnt”: true}, “app_id”: “XXXXX”, “dev_id”: “aaaaaaa”}’ ; echo

I get the error

{“error”:“permission denied: Broker did not set device: permission denied: NetworkServer did not set device: permission denied: No “devices” rights to Application “YYYY””,“message”:“permission denied: Broker did not set device: permission denied: NetworkServer did not set device: permission denied: No “devices” rights to Application “YYYY””,“code”:2}

Application YYYY does exist, and yes, the auth key has no access to it. But the call clearly states to use application XXXXX. What’s going on here?


(Mark Ruys) #2

Like the problem come up form one day to another, the issue appeared to have spontaneously gone. I guess TTN has fixed it, or some cache was flushed which made the bug disappear. Oh well.


(Mark Ruys) #3

Grr, it’s back again:

returned: permission denied: Broker did not set device: permission denied: NetworkServer did not set device: permission denied: No “devices” rights to Application “YYYY”

How annoying!


#4

I can understand (however I don’t have a solution)

best chance : https://github.com/TheThingsNetwork/ttn/issues