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/whatsapp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"country_code": "<unknown>",
"register_if_not_exists": true
}
'{
"message": "<string>",
"success": true,
"content": {
"otp_token": "<string>",
"otp_action": "<string>"
}
}Sends an OTP to the userβs WhatsApp number. 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/whatsapp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"country_code": "<unknown>",
"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.
10 digit phone number without country code, linked with WhatsApp.
10^[0-9]{10}$Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
When true, auto-registers the user if the phone number is not found. Defaults to false (OTP sent only to registered users).
OK
A descriptive message confirming the success or failure of the Login process.
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?