curl -X POST "https://staging-api.loyalty.lt/en/shop/auth/login" \ -H "X-API-Key: your_api_key" \ -H "X-API-Secret: your_api_secret" \ -H "Content-Type: application/json" \ -d '{ "phone": "+37060000000", "otp": "123456", "device_name": "iPhone 13" }'
{ "success": true, "message": "Login successful", "data": { "user": { "id": 123, "phone": "+37060000000", "email": "user@example.com", "name": "Jonas Jonaitis", "phone_verified_at": "2024-01-15T10:30:00Z", "created_at": "2024-01-01T00:00:00Z" }, "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", "refresh_token": "refresh_token_string_here", "expires_in": 3600 } }
Authenticate user with phone number and OTP code
Show data
Show user
curl -X GET "https://staging-api.loyalty.lt/en/shop/auth/me" \ -H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." \ -H "Content-Type: application/json"