A deterministic practice REST API — log in for a token, then automate products, users, and orders. Send requests right here, then run the same calls from Playwright, Postman, or REST Assured.
https://www.qapractice.com/apitestuser / Password123Authorization: Bearer <token> on protected routes.Exchange demo credentials for a bearer token. Use the token for the protected endpoints below.
| Status | When |
|---|---|
| 200 | Success — valid request. |
| 400 | A required field (username / password) is missing. |
| 401 | Credentials do not match the demo user. |
import { test, expect } from '@playwright/test';
test('Log in — get a token', async ({ request }) => {
const res = await request.post('https://www.qapractice.com/api/auth/login', {
data: { "username": "testuser", "password": "Password123" },
});
expect(res.status()).toBe(200);
const body = await res.json();
console.log(body);
});curl -X POST "https://www.qapractice.com/api/auth/login" \
-H "Content-Type: application/json" \
-d '{ "username": "testuser", "password": "Password123" }'Paste the cURL into Postman → Import → Raw text to generate a request.
💡 The console above runs the API in your browser so you can practise immediately. The identical endpoints are served as real HTTP at https://www.qapractice.com/api on the live site, so the Playwright and cURL snippets work against your own automation tools too.