Announcements

The Community is moving next week! 

Find all information incl. the timeline and tips for a smooth migration here.

Posted by
Henagon

Problems with IoT application tokens

Hello, I am trying to receive an IoT application token using the API call:

https://api.teamviewer-iot.com/<token>/[version]/apptokens 

where <token> is taken from the TV portal under https://teamviewer-iot.com/en/apikey.

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("https://api.teamviewer-iot.com/<token>/[version]/apptokens")...

Revoking the API key using

https://api.teamviewer-iot.com/<token>/[version]/revoke

works fine!

Could you please help me what I am doing wrong?

3 Replies
1 Accepted Solution

Accepted Solutions
Posted by TeamViewer Staff
TeamViewer Staff
Solution

Re: Problems with IoT application tokens

Hi,

I hope this will help.
The token is a permanent token and it won't be expired unless you renew it from the IoT dashboard. 

View solution in original post

3 Replies
Posted by TeamViewer Staff
TeamViewer Staff

Re: Problems with IoT application tokens

Hi USQL,

You can select directly 'API KEY' from IoT dashboard (https://teamviewer-iot.com/) 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 ?

Regards

 

 

Tech Support IoT

Did my reply answer your question? Accept it as a solution to help others.
Find this helpful? Say thanks by clicking on the Thumbs Up button.

Posted by
Henagon

Re: Problems with IoT application tokens

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.

Regards

Posted by TeamViewer Staff
TeamViewer Staff
Solution

Re: Problems with IoT application tokens

Hi,

I hope this will help.
The token is a permanent token and it won't be expired unless you renew it from the IoT dashboard. 

View solution in original post