Acess api resurces after login in android


I used the following uri to login from android app.

I get correct response. But when I try to access next uri:
Frappe Cloud”;
I get Authentication failed error. I am using volley library for accessing api.
Can you please tell me how does the server identifies that same user had sent the request to access the next resource.

String jsonUrl ="";
        // String id=jsonArrayRequest.getIdentifier();
        jsonArrayRequest = new JsonObjectRequest(jsonUrl,

                new Response.Listener<JSONObject>() {
                    public void onResponse(JSONObject response) {

                        try {
                            //JSONObject obj = new JSONObject();
                            msg = response.getString("message");
                            Map<String,String> h;
                            h=    jsonArrayRequest.getHeaders();
                            //   Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();

                            if (msg.equalsIgnoreCase("Logged In")) {
                                islogged = true;
                                if (islogged) {

                                Toast.makeText(getApplicationContext(), "You are logged in as " + response.getString("full_name"), Toast.LENGTH_LONG).show();
                                // call AsynTask to perform network operation on separate thread


                        } catch (Exception e) {

                new Response.ErrorListener() {
                    public void onErrorResponse(VolleyError error) {

                        Toast.makeText(getApplicationContext(), "Hi I am an error" + error, Toast.LENGTH_LONG).show();


        requestQueue = Volley.newRequestQueue(this);

1 Like

you need cookies

Recommended not to keep credentials in mobile app.

Explore OAuth2,

1 Like

Or you need access token

1 Like


Thank you sir for reply.
Resolved the issue using session id and cookies