Http requests SSL/TLS Error

im trying to get data from a site that uses certificates to authenticate the use of the site.

my certificates are up to date, and it doesnt seem to be a problem with the properties.

i get and error like this

HTTP Request: The request was aborted: Could not create SSL/TLS secure channel.

i have updated to the latest .net package which didnt resolve the problem.

im out of ideas here

Thanks in advance

Nijas Winum Hansen

Hello Nijas,
I faced this issue before but I did not use certificates so kindly add activity called (Invoke code) and add this code in it

System.Net.ServicePointManager.ServerCertificateValidationCallback =
Function(se As Object,
cert As System.Security.Cryptography.X509Certificates.X509Certificate,
chain As System.Security.Cryptography.X509Certificates.X509Chain,
sslerror As System.Net.Security.SslPolicyErrors) True

and put this acitivty direct before HTTP Request please try it and feed me back if you still face the same issue :slight_smile:

Hello Mahmoud,

the error still occurs, but the code runs as it should :frowning:

did you try to remove you certificate from HTTP request Activity and try again ? if else please share with us screen of HTTP Request properties.

from attached screen there is no body in your request also make sure from body format if it text/xml or application/xml according to your API also you marked enable SSL certificate verification. My recommendation print your request before HTTP request activity and try it on soup or reset according to your API.

Note:
Please hide your end point if it critical data.

im only trying to do a GET request so no body needed.

what do you mean with soup or reset?

this api is not some api that i control, im just trying to get data

Hello @Nijas_Hansen,

What is the issue?

Do you have a consumerKey or something? Or is it OAuth?

Hello

i am trying to get data from a webapi, in which i need to use a certificat.
this certificat is working if i put in my request in a webbrowser which is giving me the data i need.

but when i try to use it in UIPath, it seems to not work for some reason. when i tried to use the http wizard it gave me a Could not create SSL/TLS secure channel error.

i dont believe i have any consumerkey and i dont think its oauth when i use the certificat

Have you filled this? Maybe the issue is that you need to fill the ClientCertificate…

image

Maybe this forum issue can give you some help:

yes i have, still no luck :frowning:

And in the place where you check the request is working? Do you have the SSL activated there?

i believe so, its just in the browser, isnt it on by default?

Maybe the issue is not UiPath, but the certificate…

if it is, then how come, i can use it in the browser? :confused: