User Management

List and manage users within your application

List UsersGETAdmin Only
/api/users

Get a paginated list of users in your app. Requires admin role.

Query Parameters

page

Page number (default: 1)

limit

Items per page (default: 10)

role

Filter by role (user, admin, moderator, member)

appId

App ID (defaults to API key's app)

Example Request

Bash
curl -X GET "https://your-auth-server.com/api/users?page=1&limit=20&role=user" \
  -H "x-api-key: your-app-api-key" \
  -H "Authorization: Bearer admin-user-token"

Response

JSON
{
  "users": [
    {
      "id": "user_123456",
      "email": "john@example.com",
      "firstName": "John",
      "lastName": "Doe",
      "role": "user",
      "emailVerified": true,
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "totalCount": 45,
    "totalPages": 3,
    "hasNext": true,
    "hasPrev": false
  },
  "filters": {
    "role": "user"
  }
}
Security Requirements
  • • Requires valid API key for your application
  • • Requires user token with admin role
  • • Users can only see other users within their own app
  • • Cross-app access is automatically prevented