CLI Authentication
x-internal
Get CLI session details by ID or code
Retrieves the current state of a CLI session using either the session ID (UUID) or the 6-character code. This endpoint is used by both the CLI client to check if the session has been linked, and by the web interface to display session details before linking.
get/api/v3.1/cli/get-session
Query parameters
idstring required
The CLI session ID or code to check
Example:ABC123
CLI session ID (UUID format) or 6-character code to check. Both formats are supported for flexibility in client implementations.
Response
CLI session retrieved successfully. Returns full session details including linked account information if available.
Example response
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"code": "ABC123",
"status": "pending",
"expiresAt": "2023-01-01T12:00:00.000Z",
"account": {
"id": "user_12345",
"email": "user@example.com",
"name": "John Doe"
},
"api_key": "1234567890",
"scope": "project"
}