Get the CLI grant behind the credential
Returns what the person who approved this CLI credential consented to: the teams it may act on, the scopes it holds per team, and any project or environment restriction. This is what varsafe whoami prints.
/me/cliAuthorizationBearer token (varsafe CLI grant) · headerrequiredAn opaque, database-backed credential obtained through the device authorization grant (POST /auth/cli/device) and revocable on the spot. Presented as Authorization: Bearer <token>. A route accepts it only when it declares CLI access; the scopes it must hold are listed per operation under x-varsafe-cli-scopes.
Success.
accountobjectrequiredShow propertiesHide properties
userIdstringrequiredemailstring<email>requirednamestring | nullrequiredgrantobjectrequiredShow propertiesHide properties
idstring<uuid>requirednamestring | nullrequiredcreatedAtstring<date-time>requiredlastUsedAtstring<date-time> | nullrequiredShow propertiesHide properties
string<date-time>nulllastUsedIpstring | nullrequiredexpiresAtstring<date-time> | nullrequiredShow propertiesHide properties
string<date-time>nullteamsobject[]requiredShow propertiesHide properties
objectteamIdstring<uuid>requiredteamNamestringrequiredscopesstring[]requiredprojectSelectionstringrequiredallsubsetenvironmentSelectionstringrequiredallsubsetThe request failed validation. field names the offending input.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
No credential was presented, or it is invalid or revoked.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
The credential is valid but lacks the required scope, role or team access.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
The resource does not exist, or is not visible to this credential.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
Rate limited. Retry after the interval named in the response.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.
Unexpected server error. The body never carries internal detail.
statusCodeintegerrequiredHTTP status code, repeated in the body.
codestringrequiredStable machine-readable error code, e.g. SECRET_NOT_FOUND or FORBIDDEN. Branch on this, never on the message.
messagestringrequiredHuman-readable explanation. Wording may change.
fieldstringThe offending request field, present on validation failures.