GET /users/{userId}/history – Retrieves the history of actions and changes for a specific user.

  • This operation is only available for Auth0

Headers:

  • Authorization: Bearer <access_token> (required)
  • Content-Type: application/json or application/x-www-form-urlencoded (required)

Body:

  • None

Path Parameters:

  • userId: string (required) - The ID of the user whose history is being requested.

Query Parameters:

  • provider: string (optional) - The authentication provider (e.g., "auth0-user", "cognito-user").
  • limit: number (optional) - The maximum number of history records to return (default: 50).
  • next: string (optional) - A token for pagination to retrieve the next set of results.
  • eventType: string (optional) - Filter history by event type.
  • dateFrom: string (optional) - Filter history from this date (ISO 8601 format).
  • dateTo: string (optional) - Filter history up to this date (ISO 8601 format).


Status Code Meaning When it Happens
400 Bad Request Missing or invalid fields in request body
401 Unauthorized Missing or invalid authentication token
404 Not Found User not found
500 Internal Server Error Unexpected error
{
"error": "Detailed error message here"
}

GET /users/exampleUserId/history
{} // provider defaults to "auth0-user" if omitted
{
limit: 2,
count: 10,
next: "nextPageToken",
items: [
{
id: "event_123",
userId: "user_123",
type: "USER_CREATED",
user: {
// ...user fields...
}
updatedAt: "2023-12-20T00:00:00Z",
},
{
id: "event_456",
userId: "user_123",
type: "PASSWORD_CHANGED",
user: {
// ...user fields...
},
updatedAt: "2023-12-21T00:00:00Z"
}
],
format: "array";
}

  • Parameters

    • event: APIGatewayProxyEvent

      The API Gateway event containing the request.

    • context: Context
    • callback: Callback<APIGatewayProxyResult>

    Returns void | Promise<APIGatewayProxyResult>

    A Promise resolving to an API Gateway-compatible response.