v2

latestOpenAPI 3.0.3Proprietary2026-07-263483431.1 MB
Customer Auth

Start customer login

Public storefront endpoint. If the store can complete login directly, a successful credential check returns customer JWT tokens. If the store requires OTP, a successful credential check sends the one-time code and returns a message object so the frontend can show the OTP entry step.

post/v3/stores/{store_id}/public/auth/login

Path parameters

store_idstring required

Store unique_id.

Headers

X-Scalev-Storefront-Api-Keystring required

Publishable storefront public API key for the target store. Page public API keys are not accepted on Storefront public routes.

Request body

emailstring email required
passwordstring required
login_as'customer' | 'owner'

Response

Customer login tokens, or an OTP challenge message when the store requires OTP.

OR

Example response

{
  "expires_in": 900,
  "refresh_expires_in": 2592000
}