---
name: "cancelAddUnlockMethod"
mode: "api"
versionRequirements:
  - { name: "@ray-js/lock-sdk", version: "1.0.0" }
title: "cancelAddUnlockMethod - Cancel adding unlock method."
summary: "Cancel adding unlock method."
---

## cancelAddUnlockMethod

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

### Description

Cancel the ongoing add unlock method process.

### Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | `"finger" \| "face" \| "password" \| "card" \| "fingerVein" \| "hand" \| "eye"` | Yes | Unlock method type |
| `userId` | `string` | Yes | User ID |
| `timeout` | `number` | No | Timeout (ms) |

### Return Value

Type: `Promise<void>`

None (resolves after cancellation succeeds)

### Error Codes

| Error Code | Error Message |
| --- | --- |
| `1052` | The previous operation on the same device has not completed |
| `1014` | This unlock method type is not supported |
| `1001` | Device is offline |
| `1002` | Operation timed out |

### Examples

#### Example

```ts
import { cancelAddUnlockMethod } from '@ray-js/lock-sdk';
await cancelAddUnlockMethod({ type: 'fingerprint', userId: 'user_001' });
```
