Old web app doesn't have a UI to generate new tokens. You should either use modern or use API directly.
Tokens are valid for 7 days by default, but if you use API you can set your own expiration.
Hello,
How you can set your own expiration time?
You can, but you need to use the API directly.
Hello, could you share how to get or generate token and set expiration time using API ? because i can't find at API reference.
Thank in advance
Is it possible for one of the next versions to have the token expiration time as a parameter in the config file?
Thanks
The endpoint is /api/session/token
. You need to POST
a form request to it with an expiration
parameter, which is a date and time in ISO format.
Thanks Mr. Tananaev already get the token but for the response string not in JSON format
It's just the token. No JSON.
Hello,
Had 2 questions related to this topic / new change to tokens so posting them here.
Is there any potential limit to how many tokens can or may be stored in MySQL DB?
Is it possible for an admin user to generate a token for a user account?
What is the url for using the token ? The old way doesn't work, i try this url :
https://gps.tvsat.co/?token=RzBFAiEAtn58_sNmHrMH8-qIVJEdeP-fwDz9vIaKSx7DY1XvaI8CIBDIubmlU8L7WVJSGmdWzDR5xZSCfjl1xKrPkjOI9mnkeyJ1Ijo1LCJlIjoiMjAyNi0wMS0zMFQyMjowMDowMC4wMDArMDA6MDAifQ
It doesn't work because your user is disabled:
User has expired - SecurityException (Disableable:35 < LoginService:95 < *:63 < SessionResource:76 < ...)
here is a related question: I'am able to generate auth token from the modern web interface via the user's account but when using the api, it return 401. why does it behaves that way ?
Does it return any error messages?
from 5.3 release notes
I am using the legacy version and I cannot find user token in prefernces!!! Am I missing something?
How can I generate a user token, to use it then as https://myserver.com/?locale=en&token=X4KTvrKtjZKZwF3uT333WV6sdKUkTdFF
One, more how long the token will be valid?
Thanks in advance