---
title: "What does HTTP status 401 vs 403 mean?"  
description: "What does HTTP status 401 vs 403 mean?"  
author: "Anna Weber"  
published: 2026-11-14  
updated: 2026-11-14  
canonical: https://www.mindstick.com/forum/163025/what-does-http-status-401-vs-403-mean  
category: "Web and API Design"  
tags: ["HTTP status codes", "401", "403", "api(s)", "Error Handling"]  
reading_time: 1 minute  

---

# What does HTTP status 401 vs 403 mean?

My API returns 403 for a user who is logged in, but my colleague says it should be 401. Who is right?

## Replies

### Reply by Ivan Nikolaev

- **401 Unauthorized** means "I do not know who you are": no credentials, an expired token or a wrong password. Despite its name, it is about authentication. The response should include a WWW-Authenticate header, and the client may retry after logging in.
- **403 Forbidden** means "I know who you are, but you are not allowed to do this". Logging in again will not help. Your user needs a different role or permission.

So for a logged-in user who lacks permission, 403 is correct. If the token were missing or expired, 401 would be correct.

Related codes worth knowing: 404 (not found), 409 (conflict), 422 (validation failed) and 429 (too many requests). Some APIs return 404 instead of 403 on purpose, to avoid revealing that a secret resource exists.


---

Original Source: https://www.mindstick.com/forum/163025/what-does-http-status-401-vs-403-mean

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
