> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phones.farm/llms.txt
> Use this file to discover all available pages before exploring further.

# User API

> User authentication, profile queries, API key rotation, and account license status endpoints in iClick.

## 1.User Login

Login to iClick account using username and password.

### Endpoint Description

#### Endpoint Type

```
userLogin
```

#### Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `userName` | string | ✅ | Username |
| `userPasswd` | string | ✅ | Password |

#### Response Payload

```
true  // Returns true on successful login
```

### Basic Usage

```
// User login
await apiInvoke('userLogin', {
    userName: 'your_username',
    userPasswd: 'your_password'
});

console.log('Login successful');
```

## 2.User Logout

Logout from the current iClick account.

### Endpoint Description

#### Endpoint Type

```
userLogout
```

#### Parameters

No parameters required.

#### Response Payload

```
true  // Returns true on successful logout
```

### Basic Usage

```
// User logout
await apiInvoke('userLogout');

console.log('Logged out');
```

## 3.User Information

Get detailed information of the currently logged-in user.

### Endpoint Description

#### Endpoint Type

```
userInfo
```

#### Parameters

No parameters required.

#### Response Payload

Returns user information object:

```
{
    user_name: "username",
    // Other user information fields...
}
```

### Basic Usage

```
// Get user information
const userInfo = await apiInvoke('userInfo');

console.log('Phone:', userInfo.phone);
```

## 4.Create Sub-user

Create sub-user accounts based on the current user, suitable for team management scenarios.

⚠️ Interface Requires Activation

This interface is not open by default. Please contact technical support for activation if needed.

### Feature Description

#### Permission System

As the main account, you have complete management permissions for all sub-users:

| Permission | Description |
| - | - |
| ➕ **Create** | Create new sub-user accounts |
| 📝 **Modify** | Modify sub-user information (password, permissions, etc.) |
| 🗑️ **Delete** | Delete sub-user accounts |
| 📋 **Query** | View all sub-user information and status |

#### Application Scenarios

**1. Team Collaboration**

* Create independent accounts for team members
* Each member uses independent credentials to login

**2. Batch Management**

* Unified management of multiple accounts
* Batch creation of test accounts
* Centralized access control

> [!NOTE]
>
> 💡 Tip
>
> After sub-users are created, they can use the standard login interface to login. Sub-user credentials work the same way as the main account.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.