Is there a way to make the API Token Session longer?
We are trying to run some batch process automations and we are receiving the following error inconsistently:
{ "success": false, "message": "User Token was invalid or expired.", "exception": null }
How would we configure the Token Timeout to be longer?
Best Answer
-
Shane_White Cireson Support Super IT Monkey ✭✭✭✭✭
Hi @Eric_Evans
Unfortunately increasing the number of concurrent API requests is not a possibility you will probably need to rethink your approach to this and see why you are having to many concurrent requests and possibly a way to mitigate the amounts of requests.
Thanks,
Shane
0
Answers
If you isolate the token-request in separate function / method, you can catch the 401 error, and request a new token, and recursively call whatever you are trying to do.
Thank you Very much for your reply! We have figured out it is NOT an issue of timing out, but an issue regarding the maximum number of concurrent API calls. Can we increase the number of concurrent API requests for the same account? Our testing has shown that 3 is the max, but we can't predict how many we will need if multiple API processes get triggered at the same time.
Hi @Eric_Evans
Unfortunately increasing the number of concurrent API requests is not a possibility you will probably need to rethink your approach to this and see why you are having to many concurrent requests and possibly a way to mitigate the amounts of requests.
Thanks,
Shane
Thank you for this information. We were able to get abound it using a loop.