SSLHandshakeException when connecting to API through java code

Getting the below exception when connecting through java http client.


Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


Does Indeni provides SSL certificate access for APIs?

To which API you are trying to conect to? Can you share the endpoint?

Please use the attach postman file, it contains the oauth2 requestAuth API.postman_collection.json


Pay attention to the body tab it contains grant_type=client_credentials that needed for this API call

Hi,

MAN! No need any of above!!! Just pass RestAssured.useRelaxedHTTPSValidation(); before Rest Api code. DONE!`

Java Classes in Pune