Alokai
You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x

changeUserPassword

Change customer password in SAP Commerce Cloud.

This method exchanges data with the replaceUserPassword endpoint exposed by the SAP OCC API Users Controller.

This method works only in an authenticated user session (i.e. when the vsf-sap-token cookie is present in the request). The new password must be at least six characters long as well as contain a special character (e.g "$"), an uppercase character and a number.

Signature

export declare function changeUserPassword(
	context: SapccIntegrationContext,
	props: ChangePasswordProps
): Promise<void>;

Parameters

NameRequiredTypeDescription
contextRequiredSapccIntegrationContext
propsRequiredChangePasswordPropsParameter object which can be used with this method. Refer to its type definition to learn about possible properties.

Returns

This method does not return anything.

Referenced Types

Examples

Updating a customer password.

import { sdk } from '~/sdk';

await sdk.commerce.changeUserPassword({
  old: 'oldPassword1!',
  new: 'newPassword1!'
});

On this page