Hi all,
I corrected my errors by
JsonConvert the
rest_data object.
below code is working fine and getting Login Session Id.
string user_name = "xx"; string password = "xx";
var paramss = new
{
user_auth = new
{
user_name = user_name,
password = password,
encryption = "PLAIN"
},
application = "SugarCRM RestAPI Example"
};
var JsonLoginString = JsonConvert.SerializeObject(paramss);
var client = new RestClient("Servie URL");
var request = new RestRequest();
request.AddParameter("method", "login");
request.AddParameter("input_type", "JSON");
request.AddParameter("response_type", "JSON");
request.AddParameter("rest_data", JsonLoginString);
var response = client.Execute(request);
var responseData = response.Content;
var session = responseData.id;
Thank You