@@ -120,6 +120,29 @@ pip's executable locations to your ``$PATH``. If you're having a hard time, feel
120120free to ask for help on our `Discord server <https://discord.gg/BEr6y6Xqyv >`__.
121121
122122
123+ -------------------------
124+ Notes on Token Expiration
125+ -------------------------
126+
127+ Tokens are only good for seven days. Under the hood, each token is actually good
128+ for *thirty minutes *, but the library transparently issues a request to Schwab
129+ to fetch a new token when it's time to do so. (This means the "token file" would
130+ more accurately be called the "file containing the specifications required to
131+ generate new tokens," but "token file" is simpler.) Once seven days have passed
132+ since the token was originally created, they will refuse to grant new thirty
133+ minute tokens, and you need to delete your old token file and create a new one
134+ by following your preferred token creation flow.
135+
136+ In practice, this means most users will want to adopt some sort of proactive
137+ token refreshing method. For instance, if you trade during the weekdays, you may
138+ want to delete and recreate your token on Sunday before the markets open.
139+
140+ For users wanting to craft more custom workflows, the client :meth: `exposes the
141+ age of the token <schwab.client.Client.token_age> `. Note, however, that the
142+ seven day token age restriction is implemented by Schwab, and so the token may
143+ become expired sooner *or * later than seven days.
144+
145+
123146----------------------
124147Advanced Functionality
125148----------------------
@@ -138,6 +161,7 @@ instead.
138161
139162.. autofunction :: schwab.auth.client_from_access_functions
140163
164+
141165---------------
142166Troubleshooting
143167---------------
0 commit comments