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

[@salesforce/b2c-tooling-sdk](../../modules.md) / [slas](../index.md) / getRegisteredToken

# Function: getRegisteredToken()

> **getRegisteredToken**(`config`): `Promise`\<[`SlasTokenResponse`](../interfaces/SlasTokenResponse.md)\>

Defined in: [packages/b2c-tooling-sdk/src/slas/token.ts:215](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/slas/token.ts#L215)

Retrieves a registered customer access token from SLAS.

Uses the `/oauth2/login` endpoint with shopper credentials, then exchanges
the authorization code for an access token.

- **Public client**: Uses PKCE for code exchange.
- **Private client**: Uses client credentials (Basic auth) for code exchange.

## Parameters

### config

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

SLAS token configuration including shopper credentials

## Returns

`Promise`\<[`SlasTokenResponse`](../interfaces/SlasTokenResponse.md)\>

The token response including access_token and refresh_token
