I'm having some trouble requesting data through the web API. What works is logging in. I log in by requesting /web/session/authenticate and I get a session id in return. With this session id I would like to request some data.
I try requesting the data through /web/dataset/search_read given the following parameters:
[content] => {"jsonrpc":"2.0","method":"call","id":"<ID_GOES_HERE>","params":{"model":"product.product","domain":[],"fields":["price"],"session_id":"<SESSION_ID_GOES_HERE>"}}
[header] => Content-Type: application/json
Connection: Close
Cookie: session_id=<SESSION_ID_GOES_HERE>; Expires=Sun, 21-Sep-2014 11:59:02 GMT; Max-Age=7776000; Path=/
[method] => POST
[timeout] => 5
In the return headers of the search request is a HTTP/1.1 403 FORBIDDEN.
Ofcourse, the session id I send with the request is the same as I get in return from the server when I log in. Also, when i request /web/session/get_session_info, I get this in return with the correct session id:
{"jsonrpc": "2.0", "id": "<ID_GOES_HERE>", "result": {"username": "<USERNAME_GOES_HERE>", "user_context": {}, "db": "<DB_GOES_HERE>", "uid": false, "session_id": "<SESSION_ID_GOES_HERE>"}}
I notice that user_context is empty and the uid is false. Can anyone tell me if I'm doing something wrong? I'm using the online version of Odoo.