Overview
Revoke a specific workspace token by its JWT ID (JTI). This immediately invalidates the token and prevents further use. This command requires Clerk authentication and cannot revoke tokens using workspace token authentication.Syntax
Arguments
JWT ID of the token to revokeFormat:
Source: Use
jti_*
(e.g., jti_abc123def456
)Source: Use
ntcli token list
to find JTI valuesOptions
Skip confirmation promptDefault:
Use case: Automated scripts and CI/CD pipelines
false
Use case: Automated scripts and CI/CD pipelines
Output format for the revocation resultDefault:
Options:
text
Options:
text
, json
Authentication Requirements
Clerk Authentication Required: Token revocation requires Clerk authentication, not workspace tokens. You must be logged in with
ntcli auth login
.Examples
Revoke Specific Token
Force Revoke (No Confirmation)
JSON Output
Token Discovery Workflow
Find Token JTI
Revoke Old Token
Bulk Token Revocation
Revoke Multiple Tokens
Revoke Expired Tokens
Security Considerations
Impact of Revocation
Immediate Effect: Revoked tokens become invalid immediately and cannot be restored.
Current Token: If you revoke your current token, you’ll need to refresh to get a new one.
What Happens After Revocation
- API Calls Fail: Any systems using the revoked token will receive authentication errors
- CI/CD Impact: Automated systems using the token will fail
- No Recovery: Revoked tokens cannot be restored or reactivated
Best Practices
- Verify JTI: Double-check the JTI before revoking to avoid mistakes
- Update Systems: Update any systems using the token before revocation
- Monitor Impact: Check logs for authentication failures after revocation
- Document Changes: Keep records of token revocations for audit purposes
Error Handling
Authentication Required
Authentication Required
Error:
Clerk authentication required for token revocation
Solution: Log in with Clerk authentication:Token Not Found
Token Not Found
Error:
Token with JTI 'jti_xyz' not found
Solution: Verify the JTI exists:Invalid JTI Format
Invalid JTI Format
Error:
Invalid JTI format
Solution: Use the correct JTI format from token list:Token Already Revoked
Token Already Revoked
Error:
Token is already revoked
Solution: The token was previously revoked. Check token list: