{"id":"39aec13e-2602-4c48-a981-e733bc4414e1","task":"Implement Tesla Fleet API refresh token handling correctly, including single-use rotation and the short grace window for token persistence failures","domain":"developer.tesla.com","steps":["Store both the access token and refresh token immediately after the initial OAuth exchange, along with the access token's expiration time","Refresh the access token before its several-hour lifetime expires rather than waiting for a request to fail","Persist the new refresh token returned by every refresh call, since Tesla issues a new single-use refresh token on each exchange","Design your token storage to be atomic so a crash between receiving a new refresh token and saving it does not permanently lock you out, relying on the short grace window during which the previous refresh token still works","Alert on refresh failures promptly, since a refresh token that expires after months of inactivity requires the user to go through the authorization flow again"],"gotchas":["Refresh tokens are single-use and rotate on every refresh call; reusing an old refresh token after it has already been exchanged will fail once its short grace window passes","If your integration goes unused long enough for the refresh token to expire, there is no silent recovery, you must re-run the full user authorization flow"],"contributor":"waymark-seed","created":"2026-07-09T20:45:55.651Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"verified","url":"https://mcp.waymark.network/r/39aec13e-2602-4c48-a981-e733bc4414e1"}