terrillmoore / ttn_storage_api

MIT License
3 stars 4 forks source link

can't seem to get it to work #1

Open dougstarfish opened 2 years ago

dougstarfish commented 2 years ago

brand new api key with all permissions and the application id is definitely correct, but I keep getting permission denied. Any further thoughts for troubleshooting? I even tried another new api key.

ttn_storage_api.sensor_pull_storage('pi-acres-chickens', key, "1h") [{'error': {'message': 'error:pkg/auth/rights:no_application_rights (no rights for application appname@ttn)', 'grpc_code': 7, 'details': [{'correlation_id': '4078aa3e3e85493394842a0ae1a63b22', 'code': 7, '@type': 'type.googleapis.com/ttn.lorawan.v3.ErrorDetails', 'attributes': {'uid': 'appname@ttn'}, 'message_format': 'no rights for application {uid}', 'namespace': 'pkg/auth/rights', 'name': 'no_application_rights'}], 'http_status': 'Forbidden', 'http_code': 403}}]

I can't find any notes about setting or using uid, so I'm not sure if that's related or not.

terrillmoore commented 1 year ago

Sorry you're having problems. It works for me. I generated an API key in the console (with all rights), saved the key secret when prompted, and got information. The access key parameter must be set to this secret, not to the "name" of the key that shows up later. Confirmed just now while fixing #2.