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

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

# Function: ocapiDeprecatedMessage()

> **ocapiDeprecatedMessage**(`requiredScopes?`): `string`

Defined in: [packages/b2c-tooling-sdk/src/clients/error-utils.ts:47](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/clients/error-utils.ts#L47)

Builds the user-facing guidance shown when an instance has OCAPI deprecated.

Pass the SCAPI scope(s) the failed operation requires to name them in the
message (e.g. an operation needing `sfcc.scripts.rw` tells the user exactly
which scope to add). Omit `requiredScopes` for operations that have no SCAPI
equivalent — the message then uses the generic `sfcc.*` phrasing.

## Parameters

### requiredScopes?

`string`[]

## Returns

`string`
