younifyd
Menu

Get Trusted Agent Authorization Token

Get Trusted Agent Authorization Token

GET/organizations/{organizationId}/oauth2/trusted-agent/authorize

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Get Trusted Agent Authorization Token action (under Auth (SLAS)).
  3. Fill in the fields below, then reference the result from later steps as {{getTrustedAgentAuthorizationToken.response.data}}.

Request

Path parameters

organizationIdstringrequired

An identifier for the Salesforce Commerce Cloud organization the request is being made by. It consists of a prefix 'f_ecom_' followed by a 4-character [realm identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/get-started.html) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/get-started.html#instance-types).

Query parameters

client_idstringrequired

The SLAS public client ID or SLAS private client ID for use with trusted-agent requests. When using a private client ID a PKCE code challenge is not required.

channel_idstringrequired

The channel (B2C Commerce site) that the user is associated with.

code_challengestring

PKCE code challenge. Created by the caller. The `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash. The `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters. The *`code_challenge` and 'code_verifier'* are required if a using SLAS public `client_id`.

login_idstringrequired

The ID of the shopper for trusted agent access. For TAOB Guest the `login_id` must be set to `Guest`.

idp_originstringrequired

The IDP that the shopper is associated with. For TAOB Guest the `idp_origin` must be set to `slas`. This is standard for SLAS Guest requests. If any other `idp_origin` value is used, SLAS returns a bad request.

redirect_uristringrequired

The redirect for Account Manager to redirect to. A variety of URI formats and wildcard for host are supported, but app links like `airbnb://` or `fb://` are not. Examples of supported URIs: - `http://localhost:3000/callback` - `https://example.com/callback` - `com.example.app:redirect_uri_path` - ` *.subdomain.topleveldomain.com`

response_typestringrequired

Must be `code`. Indicates that the caller wants an authorization code.

One ofcode

Need more? See the Salesforce Commerce Cloud guide for connection setup and behaviour shared by every action.

Get Trusted Agent Authorization Token — Salesforce Commerce Cloud — Documentation