---
title: "Poll a device-authorization login"
method: POST
path: "/auth/oauth/device/status"
tags: ["auth", "oauth"]
---

# Poll a device-authorization login

`POST /auth/oauth/device/status`

## Request

- Base URL: `https://api.namefi.io/v-next`
- URL: `https://api.namefi.io/v-next/auth/oauth/device/status`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Long-poll the status of a device login request. Returns the minted JWT once the user approves, or a terminal state (cancelled/expired). Holds the connection up to ~25s while pending.

## Headers

- `x-namefi-eip7702-account` string
- `x-namefi-eip1271-account` string
- `x-namefi-erc1271-account` string

## Request body

- object: Input used to poll the status of a device login request.
  - `authReqToken` string, uuid, required: The authReqToken returned by the start endpoint.
  - `codeVerifier` string, required: PKCE code verifier proving possession of the codeChallenge sent at start.

## Response `200`

OK

- union: Current state of a device-authorization login request.
  - object: No decision yet; the client should poll again.
    - `status` 'pending', required: The request is still awaiting browser confirmation.
  - object: Approved response carrying the single-use JWT.
    - `status` 'approved', required: The user approved the request.
    - `token` string, required: JWT to send as an Authorization: Bearer credential.
    - `tokenType` 'Bearer', required
    - `expiresAt` string, date-time, required: ISO timestamp after which the token expires.
    - `user` object, required: Minimal user details delivered alongside an approved token.
      - `id` string, uuid, required: Authenticated user id.
      - `primaryEmail` string, nullable: Primary email of the authenticated user, if any.
      - `walletAddress` string, nullable: A linked wallet address of the authenticated user, if any.
  - object: The request was cancelled by the user.
    - `status` 'cancelled', required: The user declined the request.
  - object: The request is gone and cannot be approved.
    - `status` 'expired', required: The request no longer exists (expired or consumed).

## Other responses

- `400`: 400
- `401`: 401
- `402`: 402
- `403`: 403
- `404`: 404
- `406`: 406
- `408`: 408
- `409`: 409
- `412`: 412
- `429`: 429
- `500`: 500

---

[API](https://skmtc.dev/namefi/apis/namefi-api.md) · [All operations](https://skmtc.dev/namefi/apis/namefi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/namefi/apis/namefi-api/revisions/3c7c3ade95c9?raw)
