Authenticate with email and password to receive access tokens
cURL
curl --request POST \ --url https://api.example.com/api/auth/login \ --header 'Content-Type: application/json' \ --data ' { "email": "<string>", "password": "<string>" } '
{ "success": true, "message": "<string>", "data": { "user": { "id": "<string>", "email": "<string>", "role": "<string>" }, "accessToken": "<string>", "refreshToken": "<string>" } }
Show data properties
Show user properties
curl -X POST https://api.millenniumpotters.com/api/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "password": "SecurePass123" }'
{ "success": true, "message": "Login successful", "data": { "user": { "id": "123e4567-e89b-12d3-a456-426614174000", "email": "[email protected]", "role": "ADMIN" }, "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } }
401 - Invalid Credentials
{ "success": false, "message": "Invalid credentials" }
401 - Account Inactive
{ "success": false, "message": "Account is inactive" }
400 - Validation Error
{ "success": false, "message": "Invalid email address" }