[Request] Determine time to chat token expiry (Chat API)
Right now there is no (known?) way to determine when a chat API token will expire. They are good for 45 days, but if you run `Cchat_pass` while a token is active, you just get back the same token, so the only way to guarantee a 45 day token is to run `Cchat_revoke_tokens` before `Cchat_pass`, which is awkward.
I'd love a way to be able to query how long a token is good for, either as a new endpoint, a new field in the return data, or as a header (see for example https://discord.com/channels/229545531104296960/370093572671668224/810659079055736872 ; the header might look something like `CAuthentication-Info: expires-at=<timestamp>` )
Knowing when a chat token will expire might be of some small benefit to someone who has "stolen"/gained access to a chat token illicitly -- they know how long it is good for. But I believe this is significantly outweighed by the quality of life improvements this has for legitimate users. We can simply check when a token is near expiry, even make our chat API programs automatically inform us when expiry is imminent, without having to always revoke-and-regen to ensure we can figure out expiry by hand.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -