whoami
Show the active credential.
read onlyrepeatable
Which credential is active, which team it belongs to, and when it expires.
Nothing is asked of the server. Expiry is read out of the token itself, so a token revoked in the console still looks fine here and fails on the next real command.
Usage
outplane whoamiOutput
| Field | Type | Description |
|---|---|---|
teamSlug | string | null | Null for a token supplied through the environment, which carries a team id but no slug. |
teamId | string | Always present. |
tokenName | string | null | The label shown in the console, for a stored credential. |
expiresAt | string | null | RFC 3339, read from the token. |
daysLeft | int | null | Null when the token never expires, negative once it has passed. |
source | string | Where the credential came from (environment | config file | flag) |
Examples
Show the active credential
outplane whoamiCheck which team a script will act as
outplane whoami --json --fields teamSlug{
"teamSlug": "acme"
}Check a specific team's stored credential
outplane whoami --team acmeWhat to Know
- No network request is made. Expiry is read from the token itself, so a token revoked in the console still appears here until a command uses it.
- With OUTPLANE_TOKEN set, teamSlug is null: a slug is only learned by signing in, and teamId is the identifier every API call actually uses.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
The code on the error object is one of auth.not_authenticated, auth.team_not_signed_in. Branch on that, or on the exit status. The message is prose and changes.