HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("https://api.guesty.com/api/v2/listings");
webRequest.KeepAlive = false;
webRequest.ProtocolVersion = HttpVersion.Version11;
webRequest.Timeout = 60000;
ServicePointManager.Expect100Continue = false;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Ssl3;
webRequest.Method = "GET";
webRequest.ContentType = "application/json";
webRequest.ContentLength = 0;
string autorization = "******" + ":" + "******";
byte[] binaryAuthorization = System.Text.Encoding.UTF8.GetBytes(autorization);
autorization = Convert.ToBase64String(binaryAuthorization);
autorization = "Basic " + autorization;
webRequest.Headers.Add("Authorization", autorization);
var response = webRequest.GetResponse();
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Ssl3;