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

[@salesforce/b2c-tooling-sdk](../../modules.md) / [scapi](../index.md) / ScapiShopperAuth

# Interface: ScapiShopperAuth

Defined in: [packages/b2c-tooling-sdk/src/scapi/shopper.ts:24](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/scapi/shopper.ts#L24)

Host-held shopper access; the token never reaches executed code.

## Extends

- [`HttpTransportOptions`](../../clients/interfaces/HttpTransportOptions.md)

## Methods

### getAccessToken()

> **getAccessToken**(`siteId`, `signal`): `Promise`\<`string`\>

Defined in: [packages/b2c-tooling-sdk/src/scapi/shopper.ts:26](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/scapi/shopper.ts#L26)

Bearer token for a guest shopper on the site.

#### Parameters

##### siteId

`string`

##### signal

`AbortSignal`

#### Returns

`Promise`\<`string`\>

***

### invalidate()

> **invalidate**(`siteId`, `accessToken?`): `void`

Defined in: [packages/b2c-tooling-sdk/src/scapi/shopper.ts:31](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/b099fb909260c5c00c90ca9da612a7f50c1328d4/packages/b2c-tooling-sdk/src/scapi/shopper.ts#L31)

Drop a rejected token so the next request starts a new session. With `accessToken`, only a session
still holding that token is dropped, so a late rejection cannot discard a newer session.

#### Parameters

##### siteId

`string`

##### accessToken?

`string`

#### Returns

`void`
