---
name: "addUser"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "addUser - Add a regular member."
summary: "Add a regular member. If the lock uses a small capacity solution, it is not recommended to use this API."
---

## addUser

> [VERSION] @ray-js/lock-sdk >= 1.0.0

> 💡 If the lock uses a low-capacity solution, this API cannot be used; otherwise an error will be thrown

### Description

Add a regular user

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | `string` | Yes | User name |

### Return Value

Type: `Promise<void>`

None

### Error Codes

| Error Code | Error Message |
| --- | --- |
| `1060` | Adding regular members is not supported |
| `1009` | Required property name is missing |
| `1068` | A member with the same name already exists |

### Examples

#### Example

```ts
import { addUser } from '@ray-js/lock-sdk';
await addUser({ name: 'Zhang San' });
```
