Token expired
FATA[12:00:00] Token expired
Code: AuthorizationRequired
Request ID: 3e7d0b92a5f41c68d2e9b0a7f6c31d45
A variant of the message is Token deleted. If the key was deleted while the tunnel was running, the error appears on reconnect:
FATA[12:00:00] Failed to get connection settings: Token deleted
Code: Unauthorized
Request ID: b81c4f07e2d96a35c0f7e1b4a9d26083
tuna CLI and Tuna Desktop show this error. The client doesn't reconnect and exits right away. A background service logs the error with the note the token was revoked or does not exist, reinstall the service with a valid token and doesn't restart: restarting with the same key won't help.
Causeโ
The server knows this API key but no longer accepts it:
Token expiredโ the key's expiration date, set when it was created, has passed;Token deletedโ the key was deleted in the dashboard or withtuna api-key delete.tuna service uninstallalso deletes the service key.
What to doโ
- Create a new API key with the Run tunnels permission.
- Replace the old key wherever it's stored: in CI secrets, the
TUNA_API_KEYvariable, or the config file viatuna login --with-api-key. - If a background service shows the error, install it again:
tuna service installissues a new key for the service. See Running in the background. - Your own computer doesn't need a key: log in with
tuna login.
Learn more about keys in Sessions and API keys.