on-internet
← Community

Alternative to http status code 403 for a banned user

Stack Overflow ·

I am wondering what the best practice for the following scenario is: I have an application where a manager using the device authenticates on behalf of a customer. If the customer is banned, what is the best practice for the http status code I return them? When I return a 403 it seems as if the request they made was invalid, it does not convey to the agent the user is banned. In the same sense I do not want to send a 401 unless the credentials used to make the request were invalid. I have read a few answers and the spec and haven't found what I was looking for. I was leaning towards a custom 2X

Comments

Sign in or sign up to comment and upvote.

No comments yet.