-I have to store the cached token somewhere:
-I have to do date arithmetic, what if my server clock is incorrect,
-if an API call failed, I have to check for an additional error: a invalid token
I don't mind complexity when it is needed, but I do not prefer complexity for no good reason.
That being said, can it really be cached up to a week? I see "at most 24 hours", which means it could be even less than 24 hours, so there's no guarantee. Please see: https://www.backblaze.com/b2/docs/b2_authorize_account.html
How is your clock inaccuracy in any way the responsibility of a service provider (Backblaze or other)? From certificate expiry to inaccurate logging, and so on, complaining about "what if my clock is wrong, I have to date math in my app!" is precisely "solving the wrong problem".
In general it's considered good practice to always check return values and error codes. Not for all code, but just for the code you would like to work.
Not shifting blame on Backblaze for my server clock being potentially inaccurate.