I am developing an java web app that integrates with 3rd party API.
The thing is that when I trying to send request this persists the following issue.
I think this is because of I am calling api in localhost, but I failed to fix it myself.
here it is my code
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = [login to view URL]("application/x-www-form-urlencoded");
RequestBody body = [login to view URL](mediaType, "client_id=" + Constants.PAYPAL_CLIENT_ID +"&redirect_uri=" + Constants.PAYPAL_CLIENT_REDIRECT_URL + "&client_secret=" + Constants.PAYPAL_CLIENT_SECRET + "&code=" + code +"&grant_type=authorization_code");
Request request = new [login to view URL]()
.addHeader("Authorization", "Basic " + B64Encode(Constants.PAYPAL_CLIENT_ID + ":" + Constants.PAYPAL_CLIENT_SECRET))
Response response = [login to view URL](request).execute();
and the following is exception detail.
detailMessage = (String) "[login to view URL]: PKIX path building failed: [login to view URL]: unable to find valid certification path to requested target"
Hopefully experienced someone to help me to fix this issue