Overview
Display information about your currently stored workspace token, including JWT ID (JTI), creation time, expiration date, and validation status.Syntax
Options
Output format for token informationDefault:
Options:
text
Options:
text
, json
Display the actual token value (use with extreme caution)Default:
Security: Only use for debugging or emergency recovery
false
Security: Only use for debugging or emergency recovery
Examples
Standard Information
JSON Output
Show Actual Token (Dangerous)
Security Risk: The
--show-token
flag displays your actual token value. Never use this in shared environments or save the output to files that might be committed to version control.Token Status Information
Status Values
Status | Description |
---|---|
Active | Token is valid and can be used |
Expired | Token has passed its expiration date |
Invalid | Token format is invalid or corrupted |
Revoked | Token has been explicitly revoked |
Time Information
- Created: When the token was originally created
- Expires: When the token will expire (“Never” for non-expiring tokens)
- Days Until Expiry: Countdown to expiration (only in JSON format)
Workspace Association
The token is tied to a specific workspace UUID. If you switch workspaces, you’ll need a token for that workspace.Monitoring and Automation
Check Token Expiration
Validate Token Status
Extract Token Information
Troubleshooting Token Issues
Token Validation
Thetoken show
command validates your token and reports issues:
- Valid: Token is active and working
- Expired: Token has expired, use
ntcli token refresh
- Invalid Format: Token file is corrupted, use
ntcli token refresh
- Network Error: Cannot validate with server, check connectivity
Token File Location
Token Storage: Tokens are stored in your user configuration directory. The exact location varies by operating system.
Platform | Token Location |
---|---|
macOS | ~/.config/ntcli/ |
Linux | ~/.config/ntcli/ |
Windows | %APPDATA%\ntcli\ |
Security Considerations
When to Show Token Value
Rarely Needed: You should almost never need to see the actual token value. The
--show-token
flag exists only for emergency debugging.--show-token
only when:
- Debugging authentication issues with support
- Manually configuring systems that can’t use ntcli directly
- Recovering from configuration corruption
Safe Information Sharing
The following information fromtoken show
is safe to share:
- ✅ JTI (JWT ID)
- ✅ Creation and expiration dates
- ✅ Workspace ID
- ✅ Status information
- ❌ Actual token value (when using
--show-token
)
Error Handling
No Token Found
No Token Found
Error:
No workspace token found
Solution: Create or refresh a token:Invalid Token Format
Invalid Token Format
Error:
Token format is invalid
Solution: Refresh to get a new valid token:Workspace Not Selected
Workspace Not Selected
Error:
No workspace selected
Solution: Select a workspace first:Token Validation Failed
Token Validation Failed
Error:
Unable to validate token with server
Solution: Check network connectivity or refresh token: