---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [clients](../index.md) / generateApiClientPassword

# Function: generateApiClientPassword()

> **generateApiClientPassword**(`length`): `string`

Defined in: [packages/b2c-tooling-sdk/src/clients/am-provisioning.ts:46](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/d7ff38c7ca2b1411cd718b9554500c9416f00266/packages/b2c-tooling-sdk/src/clients/am-provisioning.ts#L46)

Generate an API client password (client secret). It has at least one
uppercase letter, lowercase letter, digit and symbol, which satisfies Account
Manager's rule of three of the four character classes, and is within its
12–128 character limit.

## Parameters

### length

`number` = `40`

Password length (default 40; 12–128)

## Returns

`string`
