1

I have an endpoint which is working by disabling SSL certificate verification in Postman. Also I add a CA certificate and client certificate details. Through Postman I am able to get a response.

But while using apex to make a callout I am getting an exception:

System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 503 Service Unavailable"

The code that I am using:

HttpRequest req = new HttpRequest();
req.setEndpoint('https://fb3d2fa7-88ba-4190-a6c1-1234545.io');  
req.setMethod('POST');  
req.setHeader('Content-Type', 'application/json');
req.setHeader('Accept', 'application/json;');
req.setClientCertificateName('Name_Certificate');

I wanted to know are there any additional parameters I need to set here to get a response from apex callout.

2
  • 3
    Are there supposed to be two dots before the io in the url?
    – Kasper
    Commented Jan 21, 2020 at 13:51
  • @Kasper No I was editing the exact URL and those got left out there .
    – user75937
    Commented Jan 22, 2020 at 5:57

1 Answer 1

1

This has to be resolved at the client end to which you are making the webservice callout .

Ask your other Team who have created that webservice and check whether they have white-listed salesforce IP's in their proxy .The Proxy here is not allowing your request to reach the exact end point and its filtering request from the SFDC.

http://www.salesforcegeneral.com/salesforce-articles/ip-whitelists-for-salesforce.html

2
  • thanks a lot Sahil , but is there a way I can disable SSL certificate through apex coding
    – user75937
    Commented Jan 22, 2020 at 9:23
  • If this answers helps you. Do upvote or mark as best answer Commented Jan 22, 2020 at 9:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .