Agents · describeDeviceCode
Look up a user code
GET /v1/device/{userCode}
For the app's /connect page: the name and kind the client suggested and when the code expires. 404 for an unknown or expired code, 409 when it was already approved or denied.
- Who may call it
- any signed-in human
- Server
- https://api.logu.dev
Parameters#
| Name | In | Type | Required | Description |
|---|---|---|---|---|
userCode | path | string | required | The user code the client showed ("WDJB-MJHT"; case and dashes don't matter). · e.g. WDJB-MJHT |
Example#
curl -s "https://api.logu.dev/v1/device/WDJB-MJHT" \
-H "Authorization: Bearer $LOGU_SESSION_TOKEN"
Responses#
200
The pending request.
{
"userCode": "WDJB-MJHT",
"clientName": "Claude Code on kevins-mac",
"clientKind": "claude-code",
"test": false,
"expiresAt": "2026-10-01T09:10:00.000Z"
}
Response fields
| Field | Type | Required | Notes |
|---|---|---|---|
userCode | string | required | |
clientName | string | required | |
clientKind | "claude-code" | "codex" | "cli" | null | required | |
test | boolean | required | |
expiresAt | string | required | date-time |
Errors#
Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | No credentials, or the API key or session is invalid or revoked. |
| 403 | forbidden | The caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint). |
| 404 | not_found | No such route, or the resource doesn't exist in your workspace. |
| 409 | conflict | The resource isn't in a state that allows this: an ask that is no longer waiting (ask has its current state), an invitation no longer pending, the last Owner. |
| 500 | internal_error | Something went wrong on Logu's side. |