I simply cannot seem to get authenticated. I've copied/pasted the ID and secret. No go.

Fatal error: Uncaught exception 'Exception' with message 'Unable to validate App Keys(ClientID/ClientSecret) provided.: Unable to validate App Keys(ClientID/ClientSecret) provided, requestToken response:{"message":"Unauthorized","errorcode":1,"documentation":""}' in /path/to/api/exacttarget/ET_Client.php on line 144

I can't even get past the construction of the class, so no need to include code! Here is the config:

return array(
    'appsignature' => 'none',
    'clientid' => 'xxxxxx',
    'clientsecret' => 'xxxxxx',
    'defaultwsdl' => 'https://webservice.exacttarget.com/etframework.wsdl',
    'xmlloc' => __DIR__.'/wsdl/ExactTargetWSDL.xml',

Right before it does the POST, I can dump:

var_dump($url, json_encode($jsonRequest)); exit;

and get

string 'https://auth.exacttargetapis.com/v1/requestToken?legacy=1'
string '{"clientId":"xxxxxxx","clientSecret":"xxxxxxx","accessType":"offline"}'

If I provide an App Center Application ID, would that help? Am I going to the right auth server? My Authentication Target is PS

TIA, Mark

1 Answer 1


The FuelSDK for PHP does not have a mechanism for switching between production support and production accounts when instantiating ET_Client. It would be possible to update the ET_Client.php file to swap the production URL: https://auth.exacttargetapis.com/v1/requestToken?legacy=1 with the one for the production support environment: https://auth-test.exacttargetapis.com/v1/requestToken?legacy=1 in order to use that environment.

  • That fixed it. Thank you for your quick and accurate answer. Too bad someone the size of Salesforce can't accurately document their own API. Apr 23, 2015 at 13:18

You must log in to answer this question.

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