POST
/
auth
/
verify-otp
curl --request POST \
  --url https://services.commercengine.dev/api/v1/x2yh61zw4k/storefront/auth/verify-otp \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "otp": "<string>",
  "otp_token": "<string>",
  "otp_action": "login"
}'
{
  "message": "<string>",
  "success": true,
  "content": {
    "user": {
      "id": "<string>",
      "first_name": "<string>",
      "last_name": "<string>",
      "email": "[email protected]",
      "is_email_verified": true,
      "phone": "<string>",
      "country_code": "<string>",
      "is_phone_verified": true,
      "profile_image_url": "<string>",
      "notification_preferences": {
        "transactional": {
          "email": true,
          "sms": true,
          "whatsapp": true
        },
        "promotional": {
          "email": true,
          "sms": true,
          "whatsapp": true
        },
        "newsletter": {
          "email": true,
          "sms": true,
          "whatsapp": true
        }
      },
      "created_at": "<string>",
      "modified_at": "<string>",
      "is_anonymous": true,
      "is_logged_in": true,
      "login_methods": [
        "<string>"
      ]
    },
    "access_token": "<string>",
    "refresh_token": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Access token

Body

application/json
otp
string
required

A string representing the one-time password.

otp_token
string
required

A string representing the OTP token.

otp_action
enum<string>
required

A string indicating the action to be performed.

Available options:
login,
register,
reset-password,
verify-phone,
verify-email,
update-phone,
update-email

Response

200 - application/json
OK
message
string

A string providing additional information about the response.

success
boolean

A boolean indicating whether the operation was successful or not.

content
object

An object containing the response content.