API-24 — Unauthenticated Request to Protected Endpoint Returns 401
Error Handling
Backend API
API-24 — Unauthenticated Request to Protected Endpoint Returns 401
API-24 — Unauthenticated Request to Protected Endpoint Returns 401
Target
Backend API — Error Handling
Preconditions
- The API server is accessible
Steps
- Send GET https://project6.dxtserver.com/drivelink_new/public/api/v1/profile with no Authorization header
- Observe the response
Expected Result
- HTTP 401 is returned
- The response body is valid JSON
- The error message indicates authentication is required