Create token for user

sakis2 years ago

Hello,
i am running the latest version of the traccar and no more there is an option to create a token for the user.
I can create it only via API?
what's the method?

Anton Tananaev2 years ago

You can create a token from settings/preferences.

Hi Anton,

created the token from settings/preferences and tried to fetch session information through postman and giving me invalid signature error
Invalid signature - SecurityException (CryptoManager: 76 < TokenManager: 69 < LoginService: 59 < ...)

If i create the token from api through postman gives below error for fetching session information
arraycopy: source index -97 out of bounds for byte[ 30 ] - ArrayIndexOutOfBoundsException (... < CryptoManager: 73 < TokenManager: 69 < LoginService: 59 < ...)

Anton Tananaev2 years ago

This error means that the token is invalid.

Thank you Anton. My bad. I was using wrong demo server.

Now, I am trying to create user and gives me below message
Administrator access required - SecurityException (PermissionsService: 77 < *: 157 < UserResource: 77 < ...)

Anything that i missed here?

Anton Tananaev2 years ago

I think the error message is pretty self-explanatory.

Ah! I was trying to create user by using user creds. I don't have admin creds and using demo3 server. How can i get them?

Anton Tananaev2 years ago

Obviously you can't get admin access to the demo servers, if that's what you're asking.