Problems with IoT application tokens

USQL Posts: 3 ✭✭
edited April 2023 in IoT Forum

Hello, I am trying to receive an IoT application token using the API call:<token>/[version]/apptokens 

where <token> is taken from the TV portal under

and [version] left out or "v1.0". The API returns:

{'error': {'code': '106', 'desc': 'Error.requested action allowable for owner only.'}} 

 I am using Python 3.7 and the requests-lib::

...response = requests.get("<token>/[version]/apptokens")...

Revoking the API key using<token>/[version]/revoke

works fine!

Could you please help me what I am doing wrong?


Best Answer


  • mircea_c
    mircea_c Posts: 146 Staff member 🤠

    Hi USQL,

    You can select directly 'API KEY' from IoT dashboard ( after login.

    Open the drop-down menu on the top right corner of the page and select 'API KEY'.

    Could you tell the use case for getting via the api call ?




    Tech Support IoT

  • USQL
    USQL Posts: 3 ✭✭

    Hi Mircea,

    the use case is a more or less completely automated setup of an edge gateway to run the TeamViewer IoT Agent. So after power-on of the edge gateway, the box should connect to the TeamViewer IoT platform using the API not knowing the  current "apllication key" which might change for some reason. In other APIs, it is quite common that a user-based API token, which does not change over time, is used to get a "session token" to use the API.