# Auth0 endpoints for managing users

## *Types*

#### *AuthResult*

**success:** A boolean indicating the success of the operation.

**message:** A message providing additional information about the operation.

#### ***AuthUser***

**email:** The email address of the user.

**blocked:** A boolean indicating whether the user is blocked.

**lastlogin:** The timestamp of the last login.

**createdAt:** The timestamp of the user account creation.

## Queries

`getUserByEmail(email: String!): AuthUser`

Retrieve user information by email.

### *Example*

```graphql
query {
  getUserByEmail(email: "user@example.com") {
    email
    blocked
    lastlogin
    createdAt
  }
}
```

## Mutations

#### `changePassword(email: String!, newPassword: String!): AuthResult`

Change the user's password.

```graphql
mutation {
  changePassword(email: "user@example.com", newPassword: "newPassword123") {
    success
    message
  }
}
```

#### `sendPasswordResetEmail(email: String!): AuthResult`

Send a password reset email to the user.

```graphql
mutation {
  sendPasswordResetEmail(email: "user@example.com") {
    success
    message
  }
}
```

#### `unblockUser(email: String!): AuthResult`

Unblock a blocked user.

```graphql
mutation {
  unblockUser(email: "user@example.com") {
    success
    message
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://codenull.gitbook.io/dev/configurations/authorization/auth0managingusers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
