Skip to content

Look up a user_code's metadata for the authorize page

GET
/api/v1/cli-auth/info
Code sample: cURL
curl 'https://dashboard.justcrawl.io/api/v1/cli-auth/info?user_code=ABCD-EFGH'

Returns the hostname submitted on /cli-auth/start plus the code’s expiry timestamp so the browser-side authorize page can render a friendly “Authorize raj-laptop?” prompt and a countdown. Unauthenticated — the user_code itself is the bearer that gates this lookup. The endpoint returns 404 for unknown codes, 410 for codes that have already been used or have expired; treat 410 as “ask the user to re-run jc auth login.” Errors are structured JustcrawlError bodies (Phase 0.6 contract) so the dashboard’s authorize page can render code-aware copy without parsing.

user_code
required
string

The XXXX-YYYY code the user pasted into the browser.

Code metadata. Used by the dashboard authorize page to render the confirm dialog.

Media type application/json
object
hostname

Sanitized hostname the CLI submitted on /start.

string
expires_at
string format: date-time
Example generated
{
"hostname": "example",
"expires_at": "2026-04-15T12:00:00Z"
}

Validation failed — request body or query is missing/invalid

Media type application/json
object
error
string
Example
{
"error": "Missing or invalid \"url\" field"
}

Unknown user_code.

Code expired or already used.

Unexpected server error. Logs and PostHog $exception capture

Media type application/json
object
error
string
Example
{
"error": "Something went wrong"
}