@@ -269,9 +269,11 @@ When endpoints return 404 or fail to register:
269269
270270# ## For Shopper APIs (ShopperToken)
271271
272- 1. Configure custom scope in SLAS Admin UI
273- 2. Obtain token via Shopper Login (SLAS)
274- 3. Include `siteId` in requests
272+ 1. **Create or update a SLAS client** with your custom scope(s)
273+ - Use `b2c slas client create --default-scopes --scopes "c_my_scope"` to create a test client
274+ - See `b2c-cli:b2c-slas` skill for full client management options
275+ 2. Obtain token via Shopper Login (SLAS) using the client credentials
276+ 3. Include `siteId` in all requests
275277
276278# ## For Admin APIs (AmOAuth2)
277279
@@ -342,6 +344,25 @@ See the `b2c-cli:b2c-scapi-custom` skill for more status options.
342344
343345Test your Custom API endpoints using curl after deployment.
344346
347+ # ## Prerequisites for Testing
348+
349+ Before testing a Shopper API with custom scopes, ensure you have a SLAS client configured with those scopes :
350+
351+ ` ` ` bash
352+ # Create a test client with your custom scope (replace c_my_scope with your scope)
353+ b2c slas client create \
354+ --tenant-id zzpq_013 \
355+ --channels RefArch \
356+ --default-scopes \
357+ --scopes "c_my_scope" \
358+ --redirect-uri http://localhost:3000/callback \
359+ --json
360+
361+ # Save the client_id and client_secret from the output
362+ ` ` `
363+
364+ See `b2c-cli:b2c-slas` skill for more options.
365+
345366# ## Get a Shopper Token (Private Client)
346367
347368Using a private SLAS client with client credentials grant :
@@ -373,7 +394,7 @@ curl -s "https://$SHORTCODE.api.commercecloud.salesforce.com/custom/my-api/v1/or
373394# ## Testing Tips
374395
375396- Use `b2c slas client list` to find existing SLAS clients
376- - Use `b2c slas client create --scopes "c_my_scope,sfcc.shopper-* "` to create a test client
397+ - Use `b2c slas client create --default- scopes --scopes "c_my_scope"` to create a test client
377398- Check logs with `b2c webdav get` from the `logs` root if requests fail
378399
379400# # HTTP Methods Supported
@@ -463,6 +484,7 @@ See `b2c:b2c-webservices` skill for complete schema documentation, or run `b2c d
463484
464485- ` b2c-cli:b2c-code` - Deploying cartridges and activating code versions
465486- ` b2c-cli:b2c-scapi-custom` - Checking Custom API registration status
487+ - ` b2c-cli:b2c-slas` - Creating SLAS clients for testing Shopper APIs with custom scopes
466488- ` b2c:b2c-webservices` - Service configuration, HTTP/FTP/SOAP clients, services.xml format
467489- ` b2c-cli:b2c-job` - Running jobs and importing site archives
468490
0 commit comments