Odoo Help


v7: setup session_id

feriel bendimerad
on 11/9/14, 9:17 AM 567 views

i've read  this  : https://www.odoo.com/forum/help-1/question/v8-authentification-json-query-has-changed-solved-44073

i've tried to get the sid ( using json queries) from /web/session/get_session_info but i've got nothing , here is the code:

 static final String REQUEST_AUTHENTICATE1 = "/web/session/get_session_info";

 HttpClient httpClient = new DefaultHttpClient();
        JSONRPCHttpClient jsonRPC_client = new JSONRPCHttpClient(httpClient, HOST + REQUEST_AUTHENTICATE1);
        try {
            //set params to send to OpenERP to create the connection
            JSONObject jsonParams = new JSONObject();
            jsonParams.put("db", DATABASE);
            jsonParams.put("login", USER);
            //Do the connection with openERP
            JSONObject json_result = jsonRPC_client.callJSONObject(method, jsonParams);
           Log.d(TAG, "We are connect to OpenERP, session id: " + json_result.getString("session_id"));


On 5/12/15, 7:31 AM

Could you be more precise ? what are the errors you've got. Can you just paste the log output.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 11/9/14, 9:17 AM
Seen: 567 times
Last updated: 5/12/15, 7:31 AM