Hi, I’m currently working on a website, that is heavily using ESI, which means I need both Access token and Char ID to be actual.
Because of how fast both access Token and Char ID are changing, I though of 2 ways to update them. I’m currently using Laravel PHP.
Create a Kron Job that will update all access tokens and character IDs 2 minute before they expire, using the refresh tokens.
Whenever I get sso_status 0 as a response, update the token and ID of the current user and retry the request.
I’m thinking the first one would be better, because I wouldn’t need to retry the requests each time the token expires, but I have no idea how will CCP SSO servers handle a mass update (even 200+ requests) each 20 minute for access tokens and setting a kron job for all the tokens would mean I’ll update even the tokens or inactive users.
What’s the best way to update both Access Tokens and Character IDs, without causing any issues for the SSO/ESI servers?
PS: As caching mechanic, I’m creating a table and just keep the information I get from the requests there, using Refresh Tokens as identifiers (the only permanent id) and if the request time is bigger then the expire time (aka the information expired, and I can make another request), then that row will be deleted, a new request will be made and a new row will be added.