> For the complete documentation index, see [llms.txt](https://lmadactyl.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lmadactyl.js.org/client/account.md).

# Account

Information about sub-users

## List sub-users

List the available sub-users on your server.

```javascript
const ptero = require('lmadactyl')
let result = await ptero.client.account.listUsers("https://yourpanel.com", "apikey", "serverid")
console.log(result) //Object
```

| Parameter              | Value                                                     |
| ---------------------- | --------------------------------------------------------- |
| panelURL (Type STRING) | The link to your pterodactyl panel                        |
| apiKey (Type STRING)   | Type 1                                                    |
| serverId (Type STRING) | Your server ID. (<https://yourpanel.com/server/**id>\*\*) |

## Account Detail

View your account details.

```javascript
const ptero = require('lmadactyl')
let result = await ptero.client.account.accountDetail("https://yourpanel.com", "apikey")
console.log(result) //Object
```

| Parameter              | Value                              |
| ---------------------- | ---------------------------------- |
| panelURL (Type STRING) | The link to your pterodactyl panel |
| apiKey (Type STRING)   | Type 1                             |

## Update Email

Update your account email

```javascript
const ptero = require('lmadactyl')
let result = await ptero.client.account.updateEmail("https://yourpanel.com", "apikey", "lmadactyl@lmadactyl.js.org")
console.log(result) //204
```

| Parameter              | Value                              |
| ---------------------- | ---------------------------------- |
| panelURL (Type STRING) | The link to your pterodactyl panel |
| apiKey (Type STRING)   | Type 1                             |
| email                  | Email you want to update           |

## Update password

Update your account password

```javascript
const ptero = require('lmadactyl')
let result = await ptero.client.account.updatePassword("https://yourpanel.com", "apikey", "oldPassword", "newPassword")
console.log(result) //204
```

| Parameter              | Value                                           |
| ---------------------- | ----------------------------------------------- |
| panelURL (Type STRING) | The link to your pterodactyl panel              |
| apiKey (Type STRING)   | Type 1                                          |
| currentPassword        | Your password you are now using on this account |
| newPassword            | New password you want to change                 |
