## Temporary Password Management

Temporary passwords support: custom password, time-limited password, dynamic password, one-time password, and clear password. Custom passwords are online passwords that require interaction with the device to sync password data to the device; other password types are offline passwords.

### Custom Password

- Requires setting password, effective time, and name (optional). The password can be used during the effective time period;
- If the effective time is exceeded, the password will become invalid;
- Custom passwords can be deleted, and will become invalid after deletion;
- Custom passwords can be frozen or unfrozen. If frozen, password unlock will be disabled.

### Time-limited Password

- Time-limited passwords must be used once within 24 hours after generation;
- If not used within 24 hours after generation, even if the password has not expired, it will become invalid;
- If used within 24 hours after generation, when the password validity period expires, the password status becomes invalid;
- During the effective time, time-limited passwords can be used multiple times.

### One-time Password

- One-time passwords have a validity period of 6 hours after being obtained, and can only be used once before expiration.

### Dynamic Password

- Dynamic passwords have a validity period of 5 minutes after generation, and can be used multiple times before expiration.

### Clear Password

- Used to clear time-limited passwords. When generating a password, you can specify clearing all time-limited passwords or a single password;
- Clear passwords have a validity period of 24 hours and must be used before expiration.

### API

#### Create Custom Password

- Meaning: Create a custom temporary password
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/createTempCustom)

#### Generate Clear Password

- Meaning: Generate a password that can be used to clear time-limited passwords
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/createTempClear)

#### Generate Dynamic Password

- Meaning: Generate a dynamic password
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/createTempDynamic)

#### Generate Time-limited Password

- Meaning: Generate a time-limited password
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/createTempLimit)

#### Generate One-time Password

- Meaning: Generate a one-time password
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/createTempOnce)

#### Get Valid Temporary Passwords

- Meaning: Get valid passwords of types such as custom, time-limited, one-time, clear, etc.
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/getTempEffectiveList)

#### Get Invalid Temporary Passwords

- Meaning: Get invalid passwords of types such as custom, time-limited, one-time, clear, etc.
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/getTempInvalidList)

#### Delete Custom Password

- Meaning: Delete a custom password in active state
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/removeTempCustom)

#### Rename Password

- Meaning: Rename passwords such as custom, time-limited, one-time, clear, etc.
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/renameTemp)

#### Freeze Custom Password

- Meaning: Freeze a custom password in active state
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/freezeTemp)

#### Unfreeze Custom Password

- Meaning: Unfreeze a custom password in frozen state
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/unfreezeTemp)

#### Update Custom Password

- Meaning: Update the name and validity period configuration of a custom password
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/updateTempCustom)

#### Clear All Invalid Passwords

- Meaning: Clear all invalid passwords
- Details: [View Documentation](/en/miniapp/develop/ray/api/doorlock/temporary/clearTempInvalidList)
