All jobs / QA / manual tester / API Testing
QA / manual tester interview question · 3–5 years
You are asked to test authentication and authorisation on an API. What is on your list?
The strongest answer
No token, an expired token and a tampered one all rejected; user A’s token refused on user B’s records; a low-privilege user refused on an admin endpoint — with 401 and 403 used as intended
Why it works
Exactly — expiry, tampering, another user’s data and privilege level are the four that actually catch defects.
What a good answer covers
- Test refusal, not only access.
- No token, expired, tampered.
- Another user’s records.
- Lower privilege on admin routes.
Answers that fall short
- Close, but not the strongest: I check that a valid token works and that a missing token is rejected with a 401
That is the first row. The dangerous gaps are expiry, tampering and one user reading another’s data. - Weak: I check that the login endpoint returns a token and that the UI can log in and out correctly
Logging in through the UI proves the happy path and none of the authorisation rules behind it. - Red flag: I run all my API tests with an admin token, because then permissions never get in the way
Testing everything as an admin is how broken permission checks ship unnoticed.
Who gets asked this
More API Testing questions
- Mobile, web, and a partner all break when you add a field. What quality object were you missing?
- An API returns 200 with an error object in the body. What do you report?
- What do GET, POST, PUT, PATCH and DELETE tell you before you write a single API test?
- An endpoint returns 400 for one request and 500 for another. What does that difference tell you?
- The UI looks fine; the list API dropped a field the mobile app still needs. Who should have caught it?
- Which request and response headers do you actually look at when testing an API?
- Pay is a POST. What conceptual API check do you insist on?
- Your Postman collection is the only way anyone tests this API, and three people now want to use it. What do…