How to get API Token with API Token?

sanger a year ago

Hey, when I create my Frontend with an API, do I have to use the Admin API Token for all Users? So if a customer is logged in he can see all his devices with my admin token? Or do I have to generate a new API Token for every user

Anton Tananaev a year ago

Why would you use tokens instead of a proper login?

sanger a year ago

I guess i explained myself not right.
The customer has to see his devices (location, speed, etc.) after he logged in. How am i supposed to get those devices and infos? Straight connection to the database and read everything out or just use the API and make a request every 10seconds to keep it updated?

If API:
How does it work? I have a Admin Api Token which i use for Administration stuff, but every customer should get their own api token right? so they dont use my api token and do wrong stuff with it.

Anton Tananaev a year ago

After login you just use the same session to do API requests. You don't need to use any tokens.

sanger a year ago

Do you have an example? Would be great

Anton Tananaev a year ago

The official app is an example of how this works.