Get Device Sign-in Request
Look up a pending stx login request before approving or denying it.
Returns what is asking to sign in with a device code — the client, where the request came from, and whether it is still pending. The dashboard's consent screen calls this before showing Authorize device and Deny, so you can check the request before you act on it.
stx login starts the request with POST /v1/auth/device-code, which returns the user code shown in the terminal. Approve it with POST /v1/auth/device-approve, or refuse it with Deny Device Sign-in. Approving a code that has expired returns 410 expired, the same code as polling and this lookup.
Requires a session JWT — the consent screen is signed in. API keys are rejected with 401. Any plan.
Path Parameters
userCodestx login, e.g. WDJB-MJHT. Case and the dash are optional: wdjbmjht finds the same request.Response — 200 OK
clientstx version only when the client sends a stx/<version> (<platform>; <arch>) user agent; otherwise it is "stx CLI" with the address.ipstatuspending, approved (approved but not yet picked up by the CLI) or denied.The device code the CLI polls with, and who approved the request, are never returned. Codes last 10 minutes.
Error Responses
401 Unauthorized
unauthorized for a missing, invalid or expired token (or an API key); session_revoked when the session has been signed out.
404 Not Found
not_found — no request has this code. A code stops existing once the CLI has picked up its token.
410 Gone
expired — the code has expired. Run stx login again for a new one.