This is my Code but is not working, Whats could be the problem??
I´m new in Hubspot integrations
var client = new RestClient(“https://api.hubapi.com/”);
var request = new RestRequest(“uploads/form/v2/{PortalId}/{formGuid}”, Method.POST);
request.AddUrlSegment(“portalId”, “miportalId”);
request.AddUrlSegment(“formGuid”, “miformGuid”);
request.AddQueryParameter(“hapikey”, “mihapiKey”);
request.AddBody(new
{
properties = new[]
{
new { property = “firstname”, value = firstName ?? string.Empty },
new { property = “lastname”, value = lastName ?? string.Empty },
new { property = “email”, value = email },
new { property = “lifecyclestage”, value = stage },
new { property = “company”, value = company },
new { property = “ubicaci_n”, value = stateName },
new { property = “centro_de_interes”, value = locationName },
new { property = “me_interesa”, value = answerInterest },
new { property = “puesto”, value = answerTitle ?? string.Empty }, // Puesto
new { property = “rea_de_trabajo”, value = answerArea ?? string.Empty },
new { property = “necesito_un_espacio_para”, value = answerSpace ?? string.Empty },
new { property = “dentro_de_cu_nto_tiempo_necesitas_el_espacio_”, value = answerTime ?? string.Empty },
new { property = “tiempo_aproximado_de_contrato”, value = answerTimeStay ?? string.Empty }
}
});
IRestResponse response = client.Execute(request);
But i am getting the next response.StatusCode: 0
“StatusCode: 0, Content-Type: , Content-Length: 0)”
Error Exception: {System.PlatformNotSupportedException: Operation is not supported on this platform. at System.Net.SystemWebProxy.GetProxy(Uri destination) at System.Net.ServicePointManager.ProxyAddressIfNecessary(Uri& address, IWebProxy proxy) at System.Net.ServicePointManager.FindServicePoint(Uri address, IWebProxy proxy) at System.Net.HttpWebRequest.get_ServicePoint() at RestSharp.Http.ConfigureWebRequest(String method, Uri url) at RestSharp.Http.PostPutInternal(String method) at RestSharp.Http.AsPost(String httpMethod) at RestSharp.RestClient.DoExecuteAsPost(IHttp http, String method) at RestSharp.RestClient.Execute(IRestRequest request, String httpMethod, Func`3 getResponse)}
Error Message: “Operation is not supported on this platform.”