So, this happen on my windows 10 machine, CouchDb 3.1.0 and Postman 7.29.1. During a DB course class i couldn't do the same as my teacher and access:
http://127.0.0.1:5984/_all_dbs
was returning a 401 error:
{
"error": "unauthorized",
"reason": "You are not authorized to access this db."
}
I did some search but couldnt find nothing, than i start to messing things around. ** ATTENTION ** This solution is for local and unsecure enviroment and has by any mean the proposity to solve any other problem.
In the CouchDB/etc, open default.ini, and change the following lines:
; When true, system databases _users and _replicator are created immediately
; on startup if not present.
single_node = true
; prevent non-admins from accessing /_all_dbs
admin_only_all_dbs = false
Than restart Apach CouchDB service (or restart computer). and voila! Hope that can help others and if my response is duplicated admins feel free to remove it. Thanks all. (sry for (m)any spelling/grammatic mistake)
Obs: Another thing that can happen is 401 on new DB. Go to DB permissions and remove _Admin from Members - Roles.