Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Error when I try to connect to a rest api

Isaac Vicentini
Mega Sage

Hi experts,

 

When trying to connect with a specific Rest API I'm getting the following return:

Request not sent to uri= https://gxxx-xx.xxx.com.br/xxxx/axxxi/xxxxxx: org.apache.commons.httpclient.HttpException: Session contains no certificates - Untrusted

 

find_real_file.png

The API is working and I only get this error when I try to connect from Servicenow.

NOTE: I AM NOT USING MID SERVER FOR THIS

 

Would anyone know the solution to this?

 

Regards,
Isaac

 

 


Best regards,

Isaac Vicentini
MVP 2025 ✨


If my answer was helpful, mark it as Helpful or Accept as Solution.

1 ACCEPTED SOLUTION

Saurav11
Kilo Patron

Hello,

Please set the property com.glide.communications.httpclient.verify_hostname to false.

You may also lie to look at the below article:-

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0851908

Please rmark answer correct/helpful based on impact.

Thanks.

View solution in original post

12 REPLIES 12

Sushma R1
Tera Expert

Check this

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0864766

This document is also useful (actually way more useful and less misleading IMO):

https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/product/mid-server/concept/mid-security-checks.html

tldr is that that I went to MID Security Policy in the SNOW UI, and disable cert checking for the Intranet zone

find_real_file.png

 

Hit helpful if it did a little bit 🙂

Hi Sushma,

 

As I mentioned above, I'm not using Mid Server, anyway, I did the test as shown and it didn't work


Best regards,

Isaac Vicentini
MVP 2025 ✨


If my answer was helpful, mark it as Helpful or Accept as Solution.

Saurav11
Kilo Patron

Hello,

Please set the property com.glide.communications.httpclient.verify_hostname to false.

You may also lie to look at the below article:-

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0851908

Please rmark answer correct/helpful based on impact.

Thanks.

Hi Saurav!

 

I set to false the following properties:

 

com.glide.communications.httpclient.verify_revoked_certificate

com.glide.communications.httpclient.verify_hostname

 

But now the error has changed to:

"Socket is closed"

find_real_file.png

 


Best regards,

Isaac Vicentini
MVP 2025 ✨


If my answer was helpful, mark it as Helpful or Accept as Solution.

It the rest api being called from a script? If so, there maybe some error in the script causing it to close socket. If possible, paste the script so we'll be able to check it.