---
schema_version: "1"
id: 20ab67dfcc49790cfd1ada1f7422a641cb4903eb084839753e6909eafd57af2b
title: Set Up API Access
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/pwa-kit-managed-runtime/guides/setting-up-api-access.md
canonical_url: https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/setting-up-api-access.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 016b5c2726627f791704f493c7dab390919c0b6c4b7727429c5c01b74b394e23
products:
  - Composable Storefront
  - Salesforce APIs
---
# Set Up API Access

Enable your PWA Kit storefront to securely access data from Shopper APIs, including products, baskets, orders, and more. The technology that authorizes this API access is called the **Shopper Login and API Access Service (SLAS)**, which is part of the Salesforce B2C Commerce API. In addition to authorizing API requests to the B2C Commerce API, SLAS also authorizes API requests to the Open Commerce API (OCAPI).

**note:** The setup process has recently been streamlined thanks to the new SLAS Admin UI.

## Before You Begin

Complete the instructions in [Authorization for Shopper APIs](https://developer.salesforce.com/docs/commerce/commerce-api/guides/authorization-for-shopper-apis.md) in the B2C Commerce API documentation to create a SLAS client. We encourage you to use a SLAS private client but depending on your use case, you could opt to use a SLAS public client instead.

If you’re planning to do a [phased rollout](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/phased-headless-rollouts.html) of a PWA Kit experience, make sure to follow the instructions in the [Extra Steps for Phased Rollouts of PWA Kit](https://developer.salesforce.com/docs/commerce/commerce-api/guides/authorization-for-shopper-apis.md#extra-steps-for-phased-rollouts-of-pwa-kit) section of the guide.

After creating a SLAS client, return to this guide and read on.

## Set the Client Secret

If you are using a SLAS private client, you must set the client secret via an [environment variable](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/use-a-slas-private-client.md#set-environment-variables).

**note:** Projects generated from PWA Kit 3.5 and above will be configured to use a SLAS private client by default.

To learn more about using SLAS private clients, see [Using A Slas Private Client](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/use-a-slas-private-client.md).

If you are using a SLAS public client, skip this section and continue with updating your OCAPI settings as described in the next section.

## Update Open Commerce API Settings

For certain features, your PWA Kit storefront must make requests to the Open Commerce API (OCAPI) on your B2C Commerce instance.

Here’s how to update your OCAPI settings for PWA Kit:

1.  Log in to Business Manager on your B2C Commerce instance.
2.  Click App Launcher ![App Launcher](https://developer.salesforce.com/docs/media/shared/appLauncher.png) and then select **Administration** > **Site Development** > **Open Commerce API Settings**.
3.  Copy this JSON:

```json
{
  "_v": "21.3",
  "clients": [
    {
      "client_id": "PLACEHOLDER_CLIENT_ID",
      "resources": [
        {
          "resource_id": "/sessions",
          "methods": ["post"],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        }
      ]
    }
  ]
}
```

4.  Go back to Business Manager and paste the JSON into the field.
5.  Replace the placeholder value for `PLACEHOLDER_CLIENT_ID` with the client ID for the public SLAS client that you created using the SLAS Admin UI.
6.  Scroll down to the bottom of the page.
7.  Click **Save**.

Repeat these instructions for each B2C Commerce instance that is used with PWA Kit.

## See Also

- [Build and Customize](https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/build-customize.md)
