---
schema_version: "1"
id: 6a7fe44f85ace3f03ebc964b23e1ce77926965a8435a4a3da4c6bdced77969d5
title: Configure Headless Commerce API Authentication via Account Manager
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/oci_impl_configure_headless_api_auth.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.oci_impl_configure_headless_api_auth.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 1008d8ef0ada0cbb0aaaadadaa303cb0ca64d867b7349471b50831adc4cdb13d
description: To authenticate with Account Manager, set up an API Client ID, then use it to obtain a token for making API calls.
products:
  - Commerce
  - Omnichannel Inventory
release: "264"
---
# Configure Headless Commerce API Authentication via Account Manager

To authenticate with Account Manager, set up an API Client ID, then use it to obtain a token for making API calls.

1. Log into Account Manager as an account administrator at [https://account.demandware.com](https://account.demandware.com).
2. Select the API Client tab.
3. Select **Add an API Client ID**.
4. Enter a unique Display Name and a strong password.
5. Under Access Control, select **Enabled**.
6. In the Organizations section, click **Add**.
7. Select your org, and click **Add**.
8. In the Roles section, take these steps:
    1. Click **Add**.
    2. Select **Salesforce Commerce API**, and click **Add**.
    3. Click the filter icon.
    4. In the Add Instance Filters tab, select your organization.
    5. Select your B2C Commerce instance, and click **Add**.
9. In the Default Scopes field, add the desired scopes. For information about available scopes, see the [AUTHZ Scope Catalog](https://developer.salesforce.com/docs/commerce/commerce-api/guide/auth-z-scope-catalog.html) in the B2C Commerce API Guide.
10. From the Token Endpoint Auth Method dropdown, select **client\_secret\_post**.
11. From the Access Token Format dropdown, select **JWT**.
    
    To obtain an Account Manager token for calling the headless Commerce APIs, use your tenant ID, Client ID (not the display name), and Client ID password. For example:
    
    ```
    curl -k --data 'grant_type=client_credentials&scope=SALESFORCE_COMMERCE_API:tenant_ID' --user 'client_ID:password' -X POST 'https://{AccountManagerURL}/dwsso/oauth2/access_token'
    ```
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-inv_omnichannel_inventory-264-0-0-production-enus/43699e0f-a394-4b55-a1eb-072df389499a/images/icon_note.png)
    
    Note The tenant ID is part of your organization ID: `f_ecom_tenant_id`. For example, if your organization ID is `f_ecom_zzzz_001`, then the tenant ID is `zzzz_001`.
    
    When building URIs for your API calls, you need the short code for your B2C Commerce realm and your Salesforce Org’s tenant group ID. Use the short code in the base URL and the tenant group ID as the organization ID. For example:
    
    ```
    https://{ShortCode}.api.commercecloud.salesforce.com/inventory/availability/v1/​organizations/{TenantGroupId}/​availability-records/actions
    ```
    
    Get the tenant group ID and the base URL, which includes the short code, from the Omnichannel Inventory admin settings page. In your Salesforce org, from Setup, in the Quick Find box, enter Omnichannel Inventory, and then select **Omnichannel Inventory**.
    
    ![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-inv_omnichannel_inventory-264-0-0-production-enus/43699e0f-a394-4b55-a1eb-072df389499a/images/icon_important.png)
    
    Important Use the tenant group ID as the Organization ID in resource URLs.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-inv_omnichannel_inventory-264-0-0-production-enus/43699e0f-a394-4b55-a1eb-072df389499a/images/icon_note.png)
    
    Note For these inventory resources, the short code is a two-character country code in capital letters. Other resources use a different short code.