Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6599837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:32:35+00:00 2026-05-25T18:32:35+00:00

When I am trying to access the salesforce API behind a proxy, I am

  • 0

When I am trying to access the salesforce API behind a proxy, I am not able to do so. When there is no proxy everything works fine.

Is there a way to set up the proxy details in the PHP code with the proxy id, username and password to allow the communication between our application and the salesforce API. I have found a few postings on the Java on how to do this but not in PHP..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:32:36+00:00Added an answer on May 25, 2026 at 6:32 pm

    It depends on if you’re using a SOAP or REST API, but both the PHP SoapClient and cURL libraries support proxies.

    For SoapClient, the documentation states:

    For HTTP authentication, the login and password options can be used to
    supply credentials. For making an HTTP connection through a proxy
    server, the options proxy_host, proxy_port, proxy_login and
    proxy_password are also available. For HTTPS client certificate
    authentication use local_cert and passphrase options. An
    authentication may be supplied in the authentication option. The
    authentication method may be either SOAP_AUTHENTICATION_BASIC
    (default) or SOAP_AUTHENTICATION_DIGEST.

    For example, this is a simplified extract from some sample code connecting to Salesforce using SOAP:

    $soapOptions = array();
    $soapOptions['proxy_host']     = "localhost";
    $soapOptions['proxy_port']     = (int) 8080; // Use an integer, not a string
    $soapOptions['proxy_login']    = "username";
    $soapOptions['proxy_password'] = "password";
    
    $this->sforce = new SoapClient($wsdlPath, $soapOptions);
    

    For cURL, take a look at the curl_setopt documentation, which has several options for proxies. Here is a simplified extract from some sample code connecting to Salesforce using REST:

    $ch = curl_init();
    ...
    curl_setopt($ch, CURLOPT_PROXY, "localhost");
    curl_setopt($ch, CURLOPT_PROXYPORT, 8080);
    curl_setopt($ch, CURLOPT_PROXYUSERPWD, "username:password");
    
    $chResponse = curl_exec($ch);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to access a view in this way: return View(@~\Items\Details.aspx); and I get
I'm trying to access the Facebook API Admin.getMetrics method via jQuery. I'm correctly composing
I am trying to access my local resources file in my code-behind. I did
I'm trying to access a 3rd party api over http using jquery .ajax (or
After trying to access ivars using KVC, I have noticed that there was no
I am trying to access permissions of all folders(not hidden) in a site for
I am trying access a REST API. I can get it working in Curl/REST
Am trying to access an API using CURL I can access the API from
Im trying to access a web service from a remote computer. I managed to
Im trying to access the Magento customer session in another part of my website.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.