@salesforce/b2c-tooling-sdk / clients / createAccountManagerUsersClient
Function: createAccountManagerUsersClient()
createAccountManagerUsersClient(
config,auth):AccountManagerUsersClient
Defined in: packages/b2c-tooling-sdk/src/clients/am-api.ts:173
Creates a typed Account Manager Users API client.
Returns the openapi-fetch client directly, with authentication handled via middleware. This gives full access to all openapi-fetch features with type-safe paths, parameters, and responses.
Parameters
config
Account Manager Users client configuration
auth
Authentication strategy (typically OAuth)
Returns
Typed openapi-fetch client
Example
ts
// Create Account Manager Users client with OAuth auth
const oauthStrategy = new OAuthStrategy({
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
});
const client = createAccountManagerUsersClient({}, oauthStrategy);
// List users
const { data, error } = await client.GET('/dw/rest/v1/users', {
params: { query: { pageable: { size: 25, page: 0 } } }
});