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/generate-otp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "sms",
"phone": "<string>",
"otp_action": "register",
"country_code": "<string>"
}
'{
"message": "<string>",
"success": true,
"content": {
"otp_token": "<string>",
"otp_action": "<string>"
}
}Generates and sends an OTP for authentication or verification. Returns an otp_token to pass to the verify-otp endpoint.
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/storefront/auth/generate-otp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"channel": "sms",
"phone": "<string>",
"otp_action": "register",
"country_code": "<string>"
}
'{
"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.
sms, whatsapp 10 digit phone number without country code.
register, reset-password, verify-phone, update-phone Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
OK
A descriptive message confirming the success or failure of the operation.
Indicates whether the request was successful or failure (true for success, false for failure).
An object containing the response content.
Show child attributes
Was this page helpful?