Commerce Engine is now in early preview. Please report any issues or feedback to support@commercengine.io
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/login/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"register_if_not_exists": true
}
'{
"message": "<string>",
"success": true,
"content": {
"otp_token": "<string>",
"otp_action": "<string>"
}
}Sends an OTP to the userβs email address. Returns an otp_token to pass to the verify-otp endpoint. Set register_if_not_exists to true to auto-register new users on OTP verification.
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/login/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "jsmith@example.com",
"register_if_not_exists": true
}
'{
"message": "<string>",
"success": true,
"content": {
"otp_token": "<string>",
"otp_action": "<string>"
}
}Access token
This param is used to enable debug mode. If debug mode is enabled, the API will return OTP as well. This is only for development and testing purposes.
Was this page helpful?