Status 403 : SG Wrong User while using Couchbase

偶尔善良 提交于 2020-01-05 03:48:11

问题


I'm sending a POST request to add Document to Couchbase Server via Sync Gateway Server. I'm using serviceconfig.json, similar to link. server key in "databases" contains a link to my Couchbase Server (http://localhost:8091). While firing the POST request, it shows a response shown below. Also, I have added the logs below,

404 no such database "fineract-cn"
400 invalid database name "favicon.ico"


回答1:


The response indicate you are not posting a doc with a proper user authentication. You need firstly create a session with username/password:

https://docs.couchbase.com/sync-gateway/2.1/rest-api.html#/session/post__db___session

the POST session request will return a cookie and a session id, in your _bulk_docs, you need to attach the cookie in your POST request.



来源:https://stackoverflow.com/questions/57507786/status-403-sg-wrong-user-while-using-couchbase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!