Verify API key authentication for accessing user profile endpoint
Preconditions (3)
Step 1: Open Postman and create a new GET request
Step 2: Enter the user profile API endpoint URL in the request URL field
Step 3: In the Headers tab, add a new header with key 'x-api-key' and value as the valid API key
Step 4: Send the request
Step 5: Observe the response status code and body
Step 6: Remove the API key header
Step 7: Send the request again without the API key
Step 8: Observe the response status code and body
✅ Expected Result: When the API key is included, the response status code is 200 and the user profile data is returned. When the API key is missing, the response status code is 401 Unauthorized with an error message.