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

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

# Function: createAccountManagerRolesClient()

> **createAccountManagerRolesClient**(`config`, `auth`): [`AccountManagerRolesClient`](../type-aliases/AccountManagerRolesClient.md)

Defined in: [packages/b2c-tooling-sdk/src/clients/am-api.ts:549](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/clients/am-api.ts#L549)

Creates a typed Account Manager Roles 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

[`AccountManagerClientConfig`](../interfaces/AccountManagerClientConfig.md)

Account Manager Roles client configuration

### auth

[`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

Authentication strategy (typically OAuth)

## Returns

[`AccountManagerRolesClient`](../type-aliases/AccountManagerRolesClient.md)

Typed openapi-fetch client

## Example

```ts
// Create Account Manager Roles client with OAuth auth
const oauthStrategy = new OAuthStrategy({
  clientId: 'your-client-id',
  clientSecret: 'your-client-secret',
});

const client = createAccountManagerRolesClient({}, oauthStrategy);

// List roles
const { data, error } = await client.GET('/dw/rest/v1/roles', {
  params: { query: { pageable: { size: 25, page: 0 } } }
});
```
