function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

API is not enabled for this Organization or Partner - w/clientId set for Professional Edition login


In testing my (Partner) app with a Professional Edition account, I am getting an error logging in through the API (using PHP Toolkit 1.0.6)

"API is not enabled for this Organization or Partner"

The following PHP snippet shows that setClientId is called before the login::

$sf_client_id = "[Client Id supplied by on certification]";

function sf_login($user_id, $wsdl, $username, $password) {
  global $sf_connection;
  global $sf_client_id;
  $loginResult = null;
  $errors = "";
  if (($username != "") && ($password != "")) {
      try {
        $sf_connection = new SforcePartnerClient();
        $loginResult = $sf_connection->login($username, $password);
        $location = $sf_connection->getLocation();
        $sessionId = $sf_connection->getSessionId();
      } catch (Exception $e) {

The request sent is:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:ns1="">
<ns1:username>[professional edition account username supplied]</ns1:username>
<ns1:password>[professional edition account password supplied]</ns1:password>

Request header:
POST /services/Soap/u/7.0 HTTP/1.1
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.0
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 317

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="" xmlns:sf="" xmlns:xsi="">
<faultstring>API_DISABLED_FOR_ORG: API is not enabled for this Organization or Partner</faultstring>
<detail><sf:fault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>API_DISABLED_FOR_ORG</sf:exceptionCode><sf:exceptionMessage>API is not enabled for this Organization or Partner</sf:exceptionMessage></sf:fault></detail>

Can you help?


Colin Goldberg

You can see in your request that the clientId didn't appear as a soap header in the  request, that's why its failing.

Hopefully one of the PHP guys can tell you what you're doing wrong.