younifyd
Menu

Request Otp

Request a one-time password (OTP) for a shopper.

POST/organizations/{organizationId}/oauth2/otp/request

Use it in a workflow

  1. Add a step and choose the Salesforce Commerce Cloud connector.
  2. Pick the Request Otp action (under Auth (SLAS)).
  3. Fill in the fields below, then reference the result from later steps as {{requestOtp.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/base-url.html#realm-id) and a 3-character [instance type identifier](https://developer.salesforce.com/docs/commerce/commerce-api/guide/base-url.html#instance-id).

Request body

Enter the body as JSON in the step's Body field.

client_idstringrequired

The ID of the OAuth client.

channel_idstringrequired

The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites

user_idstringrequired

User ID for the shopper requesting the OTP.

modestringrequired

Password Action delivery modes

One ofcallbacksmsemail

emailstring

Required when `mode` is `email`. Must match a registered email for the shopper.

callback_uristring

Required when `mode` is `callback`. Must match a registered callback URI for the client. The callback URI must be a `POST` endpoint. Wildcards are not allowed.

localeany

The locale for the OTP delivery template. Defaults to `en-US` for email mode.

json
{
  "client_id": "12345678-1234-1234-1234-123456789012",
  "channel_id": "RefArch",
  "user_id": "shopper123",
  "mode": "email",
  "email": "shopper@example.com",
  "callback_uri": "https://example.com/otp-callback",
  "locale": null
}

Response

Returns 202 with a any. Read it in later steps with {{requestOtp.response.data.<field>}}.

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

Was this page helpful?
Request Otp — Salesforce Commerce Cloud — Documentation