Hi Andy,
I am too facing the same issue. Steps I did are
- Created a user “U” in Sync Gateway, with admin_channel “X” .
- Created a document “D” having channels property set to “X”.
{
"_id": “D”,
“channels”: “X”,
“message”: “We’re having winter”,
“temperature”: “4”
} - I have not changed sync function so it must be using Default Channel function
function (doc) {
channel(doc.channels);
} - Now when I try to read the same document with Authorization for the above user
but getting forbidden status code.
Request
http://localhost:4984/sync_gateway/X
Authorization Basic Base64encode(username:password)
Response
{
“error”: “Forbidden”
“reason”: “forbidden”
}
Please let me know if I am doing anything wrong.