{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/salesforce-commerce-cloud/json-schema/salesforce-commerce-cloud-session-bridge-token-request-schema.json",
  "title": "SessionBridgeTokenRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/salesforce-commerce-cloud-auth-api-openapi.yml#/components/schemas/SessionBridgeTokenRequest",
  "required": [
    "channel_id",
    "client_id",
    "code",
    "code_verifier",
    "dwsid",
    "grant_type",
    "login_id"
  ],
  "type": "object",
  "properties": {
    "code": {
      "maxLength": 256,
      "type": "string",
      "description": "Authorization code returned from session bridge authorization received in the front channel that is used to get session bridge access tokens and refresh tokens. Required with a grant type of `session_bridge`. The SLAS client must have the `sfcc.session_bridge` scope to request a session bridge token."
    },
    "client_id": {
      "maxLength": 40,
      "type": "string",
      "description": "The SLAS public client ID for use with PKCE requests. This is a required parameter when using a public client."
    },
    "channel_id": {
      "maxLength": 100,
      "type": "string",
      "description": "The channel (B2C Commerce site) that the user is associated with."
    },
    "code_verifier": {
      "type": "string",
      "description": "PKCE code verifier. Created by the caller. This is a required parameter when using a public client.\n\nThe `code_challenge` is created by SHA256 hashing the `code_verifier` and Base64 encoding the resulting hash.\n\nThe `code_verifier` should be a high entropy cryptographically random string with a minimum of 43 characters and a maximum of 128 characters."
    },
    "dwsid": {
      "type": "string",
      "description": "Cookie passed back from the '/authorize' endpoint call for session bridge. This parameter is optional and not needed if using the `dwsgst` parameter.\n\n**DEPRECATED** - As of January 31, 2024, SLAS will no longer support the SESB `dwsid` parameter for `guest` users for `session-bridge/token` calls. It is recommended to transition over to using a SESB `dwsgst` token. \n\nThe `dwsid` will still be needed for `registered` user session-bridge/token calls."
    },
    "grant_type": {
      "type": "string",
      "description": "Grant Type",
      "enum": [
        "authorization_code",
        "refresh_token",
        "client_credentials",
        "authorization_code_pkce",
        "session_bridge"
      ]
    },
    "login_id": {
      "maxLength": 128,
      "type": "string",
      "description": "The ID of the shopper for session bridge access. If requesting a token for a guest user set login_id to `guest`."
    },
    "dwsgst": {
      "type": "string",
      "description": "Signed guest Json Web Token (JWT) that was obtained from B2C Commerce. This parameter is optional and not needed if using the guest `dwsid` parameter."
    },
    "dwsrst": {
      "type": "string",
      "description": "Signed registered customer Json Web Token (JWT) that was obtained from B2C Commerce. This parameter is optional and not needed if using the registered user `dwsid` parameter. \n\n**NOTE:** The registered customer Json Web Token (JWT) will be available in ECOM versions 25.4 and higher."
    },
    "usid": {
      "type": "string",
      "description": "The unique shopper ID. Returned when from session bridge authorization."
    },
    "dnt": {
      "type": "string",
      "description": "This is an optional parameter to set `Do Not Track` for the session. \n\nSLAS is making this available, but will not be used by B2C Commerce until after the 24.4 release.\n\nValues are:\n  * `false`\n  * `true`\n\nIf not added the `dnt` value will default to `false`."
    }
  }
}