Description
hi, im using c# to get authenticated. getting empty response.
need some help to figure why .
ServicePointManager.Expect100Continue =true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
| SecurityProtocolType.Tls12
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls;
ServicePointManager.ServerCertificateValidationCallback =delegate {returntrue; };
var request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType ="application /json";
request.Method ="POST";
request.Timeout = Timeout.Infinite;
request.KeepAlive =true;
request.AllowAutoRedirect =false;
request.ReadWriteTimeout = 30000;
request.PreAuthenticate =true;
request.Credentials = CredentialCache.DefaultCredentials;
request.Accept ="application/json";
using (var streamWriter =new StreamWriter(request.GetRequestStream(), System.Text.Encoding.ASCII))
{
string json =new JavaScriptSerializer().Serialize(new
{
authorization ="Basic mysecretfortest"
});
streamWriter.Write(json);
}
string Expiration =string.Empty;
var responsessss = (HttpWebResponse)request.GetResponse();
using (var streamReader = new StreamReader(responsessss.GetResponseStream()))
{
var result = streamReader.ReadToEnd();
var jss =new JavaScriptSerializer();
Error
empty response
Which App Type (OAuth / Chatbot / JWT / Webhook)?
OAuth
Which Endpoint/s?
Knowing the API endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.