GET /users-by-email/{email} – Retrieves user given the email.

  • This endpoint is only available for Auth0.
  • Sensitive information like passwords are never included in the response.

Headers:

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

Body:

  • None

Path Parameters:

  • email: The email of the user to retrieve. (required)

Query Parameters:

  • provider: The authentication provider (optional). Defaults to auth0-user.
  • accountProvider: The account provider to filter by (optional).
  • connection: The connection name to filter by (optional).

  • 200 OK – Returns a JSON-stringified Auth0User object.

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

GET /users-by-email/user@district.com?accountProvider=account_abc&connection=conn_xyz&provider=auth0-user
{
"id": "user_123",
"email": "user@district123.com",
"name": "John Doe",
"blocked": false,
"emailVerified": true,
"createdAt": "2025-09-12T12:00:00Z",
"updatedAt": "2025-09-12T12:00:00Z",
"appMetadata": {
// ...app metadata fields...
},
"userMetadata": {
// ...user metadata fields...
}
// Additional user fields
}

  • 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.