cURL
curl --request POST \ --url https://api.example.com/api/auth/login \ --header 'Content-Type: application/json' \ --data ' { "email": "<string>", "password": "<string>" } '
{ "success": true, "data": { "user": { "id": "<string>", "email": "<string>", "fullName": "<string>", "phone": {}, "avatar": {}, "emailVerified": true }, "accessToken": "<string>", "refreshToken": "<string>" } }
Authenticate with email and password
Show data properties
Show user properties
{ "success": false, "error": { "message": "Invalid credentials", "statusCode": 401 } }
{ "success": false, "error": { "message": "Account is disabled", "statusCode": 403 } }
{ "success": false, "error": { "message": "Validation error", "statusCode": 400, "details": [] } }
curl -X POST https://api.example.com/api/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "password": "securePassword123" }'
{ "success": true, "data": { "user": { "id": "clx1234567890abcdef", "email": "[email protected]", "fullName": "John Doe", "phone": "+1234567890", "avatar": null, "emailVerified": false }, "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "refreshToken": "rt_clx1234567890abcdef" } }