QAFakeAPI LogoQAFakeAPIOfficial API Specification
📥 Download OpenAPI JSON🚀 SDET Toolkit (₹499)🎮 Open Studio Console →
POST/api/v1/auth/login

User Login & JWT Token Generation

Authenticate with test user credentials to receive a signed Bearer JWT token valid for 24 hours. Required for protected mutations.

Request Headers

Content-Typeapplication/json

Request Body (JSON)

{
  "username": "aquil",
  "password": "test1234"
}

Expected Responses

200 OKSuccessfully authenticated. Token returned.
{
  "message": "Login successful",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": 1,
    "username": "aquil",
    "email": "aquil@techqlabs.in",
    "role": "admin"
  }
}
401 UnauthorizedInvalid credentials provided.
{
  "error": "Unauthorized",
  "message": "Invalid username or password"
}
Want to test this endpoint right now?

Open our interactive console with live execution, automatic auth headers, and framework code generator.

🎮 Test in Studio Console →