Hi, I am trying to send data from TTN to my own server, and then save the data on my MySQL database. I’m fairly new at Python, and with HTTP, so for me there are some challenges.
Traceback (most recent call last):
File "getData.py", line 22, in <module>
my_app = app_client.get()
File "/home/xxx/.local/lib/python2.7/site-packages/ttn/application.py", line 64, in get
" application: {}".format(err.code().name))
RuntimeError: ('Error while getting the', ' application: PERMISSION_DENIED')
Why do I receive this error - permission denied? What am I doing wrong? Whenever this is fixed I can create code for inserting this data into the SQL database, but first of all I need this to work.
Hi @DTUIotLab, you appear to be mixing up the TTN HTTP and MQTT integrations.
Your TTN application integration is trying to post the uplink data using HTTP.
Your server-side code is trying to listen to the MQTT publish/subscribe system.
These are completely separate protocols for integration.
MQTT integration is enabled by default so if your python code is correct then this will work without any HTTP integration on the TTN servers.
I thought HTTP integration was the best solution to send data from TTN to my own server. For some reason, this code, for me, seemed to be one of the steps to do so.
Are you hosting this code on a web server? This thread started out life as a confusion between writing code for MQTT and then deploying it for HTTP Integration
Not is not hosted on a web server, despite the tittle, but it is exactly the same error message.
It is an application written in Python
The rest of the functions , are working OK
It is not critical as I just wanted to know what is the return, my app is working without using the get function.
Thanks.
AC/.