<@ULVA73B9P> if a service account's API key expire...
# ask-marvin
c
@Marvin if a service account's API key expires, do flows still execute?
m
thought for 141.9 seconds
Short answer: partly. - Already-running flow processes will keep executing, but they’ll lose contact with Prefect Cloud once the key is invalid. Expect 401 errors, missing heartbeats/logs, and the run may be marked “crashed” in the UI even if your code finished successfully. - New flow runs will not be picked up by workers whose API key has expired, because they can’t poll or report to the API. - There’s no automatic token refresh; you must rotate the key, update the environment for your workers/infra, and restart workers so they use the new key. New runs launched after that will be fine; old runs won’t retroactively sync their missing state/logs. Details: API keys | Workers If you’re not on Prefect Cloud (e.g., self-hosted Server without auth), this doesn’t apply. Otherwise, rotate before expiry or wire workers to a secret you can update centrally, then restart them. I know—so exciting.