I want to get List from Sharepoint using mobile devices therefore I am using REST API with DefaultCredentials,I have already given Read rights to my List but I am getting
The remote server returned an error: (401) Unauthorized
My Code Is:
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("ListUrl"); request.Method = "GET"; request.Accept = "application/json;odata=verbose"; request.ContentType = "application/json;odata=verbose"; request.UseDefaultCredentials = true; request.PreAuthenticate = true; request.Credentials = System.Net.CredentialCache.DefaultCredentials; WebResponse response = request.GetResponse();
Is it possible via REST API or any other solution?? Is there anything that I am missing???