The HTTP 401 Unauthorized error code indicates that the requested resources is restricted and to access the resources needs valid authentication, the requested client has lacks valid authentication for the target resources.
Error 401 can occur in one of several possible scenarios.:
- The client sent its authentication credentials to the server, but the server has rejected the credentials.
- The client has not provided authentication credentials in the request.
- The client is banned for some reason.
- The client has provided wrong credentials.
- The client credentials has been expired.
How to fix 401 error code?
- Check requested URL – Make sure you are using correct url
- Check the credentials
- Clear Cookies and cache
- Logout and login