Complete overview of authentication and user management endpoints
POST /{locale}/shop/auth/request-otp
- Request OTP code via SMSPOST /{locale}/shop/auth/verify-otp
- Verify OTP code (standalone)POST /{locale}/shop/auth/login
- Login with phone + OTPPOST /{locale}/shop/auth/register
- Register new user with phone + OTPPOST /{locale}/shop/auth/qr-login/generate
- Generate QR sessionGET /{locale}/shop/auth/qr-login/poll/{sessionId}
- Poll session statusPOST /{locale}/shop/auth/qr-login/scan/{qrCode}
- Scan QR (mobile)POST /{locale}/shop/auth/qr-login/confirm/{sessionId}
- Confirm loginPOST /{locale}/shop/auth/refresh
- Refresh expired access tokenPOST /{locale}/shop/auth/logout
- End user sessionGET /{locale}/shop/auth/me
- Get current user informationGET /{locale}/shop/auth/me
- Get complete user profilePUT /{locale}/shop/auth/profile
- Update user details (name, email)GET /{locale}/shop/auth/preferences
- Get user preferencesPUT /{locale}/shop/auth/preferences
- Update notification/privacy settingsGET /{locale}/shop/auth/statistics
- Get user loyalty statisticsDELETE /{locale}/shop/auth/account
- Delete/deactivate user accountEndpoint Group | Authentication | Notes |
---|---|---|
OTP Requests | API Credentials | Server-side only |
Login/Register | API Credentials | Public endpoints |
QR Generation | API Credentials | Public endpoints |
Session Management | JWT Token | User context required |
Profile Management | JWT Token | User context required |
Statistics | JWT Token | User context required |
Error Code | Description | Solution |
---|---|---|
OTP_EXPIRED | OTP code has expired | Request new OTP |
OTP_INVALID | Wrong OTP code entered | Verify code or request new |
TOKEN_EXPIRED | JWT token expired | Use refresh token endpoint |
USER_NOT_FOUND | Phone number not registered | Use register endpoint |
USER_EXISTS | Phone already registered | Use login endpoint |
QR_SESSION_EXPIRED | QR login session expired | Generate new QR session |