neosourceDocs
Search docs

Get CLI login session status

GET/api/cli/login/sessions/{session_id}

getCliLoginSession

Authentication is not described for this operation in the spec — that does not mean it is public. Check tokens and scopes.

curl

curl -X GET 'https://neosource.dev/api/cli/login/sessions/SESSION_ID'

fetch

fetch("https://neosource.dev/api/cli/login/sessions/SESSION_ID", {
  method: "GET",
});

Path parameters

session_idrequired

CLI login session ID.

string

Responses

200CLI login session

application/json

CliLoginSessionResponse

object

created_atrequired

integerint64

expires_atrequired

integerint64

machine_namerequired

string

purposerequired

CliDevicePurposeResponse

string

"login""ssh_enrollment"

session_idrequired

string

ssh_key_algorithm

string | null

ssh_key_fingerprint

string | null

ssh_key_name

string | null

ssh_key_public_key

string | null

Canonical OpenSSH public-key line for a new key-bearing session. This is omitted for keyless sessions and for legacy responses that do not carry the complete key binding.

statusrequired

CliLoginSessionStatus

string

"pending""approved""consumed""expired"

user_coderequired

string

Same code the CLI printed — shown so the user can confirm a match.

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 400Bad Request — one of: invalid_input
  • 404Not Found — one of: not_found
  • 429Rate limited — retry after the `Retry-After` header
  • 500Internal server error
  • 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
  • 504Gateway timeout — the request exceeded the server's handling budget