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.setHeader('Content-Type', 'application/json');
req.setHeader('Accept', 'application/json;');

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

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

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.


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.