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

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/bm-users](../index.md) / createBmUserAccessKey

# Function: createBmUserAccessKey()

> **createBmUserAccessKey**(`instance`, `login`, `scope`): `Promise`\<\{ \}\>

Defined in: [packages/b2c-tooling-sdk/src/operations/bm-users/users.ts:332](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/5f9b348d598ad92ddf670da42e944b204395bdc8/packages/b2c-tooling-sdk/src/operations/bm-users/users.ts#L332)

Creates a single access key for an externally-managed user (replaces any existing key
for the same scope).

The returned object includes the newly-generated `access_key` value — this is the only
time it is returned, so callers should record it.

## Parameters

### instance

[`B2CInstance`](../../../instance/classes/B2CInstance.md)

B2C instance

### login

`string`

User login

### scope

`string`

Access key scope

## Returns

`Promise`\<\{ \}\>

Access key details (including the secret `access_key` value)
