I am getting error during callout although I have added the url in remote sites. Can this be due to port 444 which other system has provided? What I can do to fix this as this is external system url which has been provided to me but not able to make callouts to this endpoint.

My end point url is like:



You'll need to use a proxy of some sort, or convince the external site to change the port. The only allowed ports in remote sites are 80, 443, and 1024 to 65535. Other than that, you won't be able to use Apex code, and you'll have to resort to JSONP, CORS-enabled endpoints for JavaScript, etc. There's no Salesforce-based solution to this problem at all, as this is an intentional security feature.

  • I am doing Request.setEnpoint('ap-test-abc.com:444/dev/Confirmation/v1.0/Payment') Instead of this what I need to do to make this work? I couldn't find much on JSONP and CORS sorry. – shukla yogesh Nov 14 '18 at 23:28
  • @shuklayogesh You need to ask your site "ap-test-abc.com" to change the port to 80, 443, or 1024 or greater, or you need to set up a port-forwarding proxy. Or using CORS, but that requires cooperation from the site as well, and you can't use Apex code, it would have to be written in to a Visualforce page. – sfdcfox Nov 14 '18 at 23:33

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.