Hi Wahaj,
Thanks for your response.
As you mentioned, i am using api url only not IP address. Also i have checked Third party end and they have confirmed that they dont have any certification and also they have used protocol 1.2
App url :https://xxxxxx.onbmc.com/.../login
Please refer below sample code for your reference
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://xxxxxxxx.onbmc.com/.../login");
request.Method = "POST";
request.UseDefaultCredentials = false;
request.ContentType = "application/x-www-form-urlencoded";
request.Timeout = 200000;
List<KeyValuePair<string, string>> allIputParams = new List<KeyValuePair<string, string>>();
allIputParams.Add(new KeyValuePair<string, string>("username", "xxxxxx"));
allIputParams.Add(new KeyValuePair<string, string>("password", "xxxxxxx"));
var formUrlEncodedContent = new FormUrlEncodedContent(allIputParams);
var urlEncodedString = formUrlEncodedContent.ReadAsStringAsync().Result;
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
streamWriter.Write(urlEncodedString);
}
request.ServicePoint.Expect100Continue = true;
HttpWebResponse httpResponse = (HttpWebResponse)(request.GetResponse());
StreamReader reader = new StreamReader(httpResponse.GetResponseStream());
var token = reader.ReadToEnd();