CLI Authentication
x-internal

Get CLI session details by ID or code

Changed on

Retrieves the current state of a CLI session using either the session ID (UUID) or the 6-character code. The first UUID lookup after the session is linked returns its API key; each session issues one key. A code lookup reports status only and never returns a key.

get/api/v3/cli/get-session

Request

  • Base URL
    https://backend.composio.dev
  • URL
    https://backend.composio.dev/api/v3/cli/get-session
  • Auth
    no_auth (a scheme the document does not define)

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.

idstring required

The CLI session ID, or the code for a lookup by code

codestring required

The 6-character hexadecimal code used for CLI login

status'pending' | 'linked' required

The current status of the session

expiresAtstring required

The ISO timestamp when the session expires

api_keystring nullable required

The API key for the linked account

scope'project' | 'user' nullable required

The key scope for this session

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"
}

Changes