I don't think that's the problem, the expiration time of the token is by default 60 minutes and also I always generate a new token before making the call to the api even if it is not necessary.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The little googling I've done on the error points to expiry or an invalid token. You could keep trying and see if you can reproduce it consistently and see if there's a clue as to why it happens.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The only way I have managed to reproduce the error is by sending a wrong token on purpose, but I don't understand why this happens when the token is given to me by ART API itself.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I have in my code a function where I make two calls to the api, the first one:
http://localhost/art/api/login?username=test&password=test
With this first call I get the token, which one I use in the second call:
http://localhost/art/api/reports/name/TESTREPORTNAME
Most of the time I execute this functions with a button in my application, it works fine, but sometimes the api returns the error 500.
Any idea why this happens? Thanks.
You could check if an error is reported in the logs.
That is the log:
The JWT token used in authentication may have expired. You can check the expiry setting in the Settings page.
I don't think that's the problem, the expiration time of the token is by default 60 minutes and also I always generate a new token before making the call to the api even if it is not necessary.
The little googling I've done on the error points to expiry or an invalid token. You could keep trying and see if you can reproduce it consistently and see if there's a clue as to why it happens.
The only way I have managed to reproduce the error is by sending a wrong token on purpose, but I don't understand why this happens when the token is given to me by ART API itself.
You could also try to set the token not to expire and avoid generating/requesting new tokens to see if that makes a difference.
Is it possible to do that in ART? I thought that the token should have an expiration date, either 60 minutes or 10 hours.
If you set the token expiry to 0 in the settings page, tokens should not expire.