# GET /auth/me

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the auth group.

Get the authenticated user and token details

- Who may call it: administrator, reseller, customer
- Token scope: any
- Answers: 200 OK

For customers and resellers, the user object includes the home directory and system UID. The UID is null if the system account does not yet exist. Both fields are null for administrators. Token details include its scopes, bound IP address, expiration, and who opened the session if someone else did.

The second_factor object reports enrollment status, confirmation time, and the number of recovery codes left. Its required field indicates whether this session is subject to the second-factor requirement. Its required_from_next_sign_in field applies to administrators whose current session predates the requirement.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X GET "$API/auth/me" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "ban": {
    "address": "info@example.com",
    "banned_at": "text",
    "id": 1,
    "jail": "text",
    "line": "text",
    "scope": "all",
    "service": "ssh",
    "state": "active",
    "unbanned_at": "text",
    "unbanned_by": "text",
    "until": "text"
  },
  "flag": {
    "address": "info@example.com",
    "failures": 1,
    "first_at": "text",
    "flagged_at": "text",
    "kind": "panel",
    "login": "text",
    "protocol": "text",
    "refusals": 1,
    "state": "active",
    "unflagged_at": "text",
    "unflagged_by": "text",
    "until": "text"
  },
  "notices": [
    {
      "deadline": "text",
      "key": "panel.port",
      "kind": "profile",
      "level": "error",
      "message": "text",
      "new_port": 8443,
      "old_port": 8443,
      "since": "text"
    }
  ],
  "problems": [
    {
      "below_reserve": true,
      "days_left": 1,
      "error": "Domain 'example.com' already exists",
      "failed": 1,
      "free_bytes": 1,
      "in_place": true,
      "job": 1,
      "key": "panel.port",
      "level": "error",
      "message": "text",
      "name": "alice",
      "not_after": "text",
      "panel": true,
      "percent": 1,
      "queue": 1,
      "quiet": true,
      "refused": 1,
      "reserve_bytes": 1,
      "since": "text",
      "threshold": 1
    }
  ],
  "second_factor": {
    "confirmed_at": "text",
    "enabled": true,
    "pending": true,
    "recovery_codes_left": 1,
    "required": true
  },
  "server": {
    "host": "text",
    "os": "text",
    "version": "0.0.1"
  },
  "server_time": "text",
  "sftp": {
    "port": 8443,
    "user": "alice"
  },
  "shell": {
    "php": [
      {
        "path": "public_html/index.php",
        "version": "0.0.1"
      }
    ]
  },
  "timezone": "text",
  "token": {
    "address": "info@example.com",
    "created_at": "2026-09-09T10:15:00Z",
    "expires_at": "2026-09-16T10:15:00Z",
    "id": 1,
    "kind": "session",
    "label": "my laptop",
    "opened_by": "text",
    "plugin": "text",
    "scopes": [
      "read"
    ],
    "user": "alice",
    "user_agent": "text"
  },
  "user": {
    "backups": true,
    "bandwidth_bytes": 1,
    "bandwidth_cut": true,
    "bandwidth_cut_at": "text",
    "bandwidth_limit_bytes": 1,
    "created_at": "2026-09-09T10:15:00Z",
    "customers": 1,
    "disk_limit_bytes": 1,
    "email": "alice@example.com",
    "home": "text",
    "id": 1,
    "move_state": "leaving",
    "name": "alice",
    "owner": "text",
    "owner_id": 1,
    "package": "basic",
    "package_backups": true,
    "package_id": 1,
    "package_shell": true,
    "role": "user",
    "second_factor": true,
    "shell": true,
    "status": "active",
    "system_password": true,
    "uid": 1
  }
}
```

## Errors

- 400: Domain name required
- 400: Domain name too long
- 400: Invalid IPv4 address
- 400: Invalid IPv6 address
- 400: Invalid domain name
- 400: Invalid port
- 400: Invalid setting key
- 401: Authentication required
- 404: Setting '<key>' not found
