Closed danniehansen closed 5 years ago
Hi @danniehansen!
It looks like you are missing some config params from the 3rd parameter. Adapt the example bellow to your needs:
$client = new ET_Client(!file_exists('soap.xml'), false, array(
'appsignature' => 'none',
'clientid' => 'YOUR_CLIENT_ID',
'clientsecret' => 'YOUR_CLIENT_SECRET',
'defaultwsdl' => 'https://webservice.exacttarget.com/etframework.wsdl',
'xmlloc' => 'soap.xml',
'baseUrl' => 'YOUR_REST_TSE',
'baseAuthUrl' => 'YOUR_AUTH_TSE',
'baseSoapUrl' => 'YOUR_SOAP_TSE',
));
Hi @sfdrogojan,
I'm getting the same thing after defining all of those additional params. Strange thing is though that even without these params it worked for other configurations for older packages. But lately when creating new packages the error i reported started occurring.
Hi, @danniehansen!
I just created a new package in my Marketing Cloud account that uses the legacy authentication. Here is what I further did in order to test what might be happening:
$this->client = new ET_Client(true);
with this:
$this->client = new ET_Client(false, false, array( 'appsignature' => 'none', 'clientid' => 'YOUR_CLIENT_ID', 'clientsecret' => 'YOUR_CLIENT_SECRET', 'defaultwsdl' => 'https://webservice.exacttarget.com/etframework.wsdl', 'xmlloc' => '/some/path/to/cache/ExactTargetWSDL.xml', 'baseUrl' => 'YOUR_REST_TSE', 'baseAuthUrl' => 'YOUR_AUTH_TSE', 'baseSoapUrl' => 'YOUR_SOAP_TSE'));
The authentication succeeds (checked in Fiddler Web Debugger), all four tests are passing.
My guess is that you are using both theparams
constructor parameter and you also have aconfig.php
file that is overwriting some of the parameters that you provided in the constructorparams
parameter.
@sfcbetiuc
Hi,
Sorry for the late response. That's really odd. Tried doing something similar.
<?php
require __DIR__ . '/vendor/autoload.php';
use FuelSdk\ET_Client;
use FuelSdk\ET_DataExtension;
$client = new ET_Client(!file_exists('soap.xml'), false, array(
'appsignature' => 'none',
'clientid' => 'x',
'clientsecret' => 'x',
'defaultwsdl' => 'https://webservice.exacttarget.com/etframework.wsdl',
'xmlloc' => 'soap.xml',
'baseUrl' => 'x',
'baseAuthUrl' => 'x',
'baseSoapUrl' => 'x',
));
$getDE = new ET_DataExtension();
$getDE->authStub = $client;
$getDE->props = array('CustomerKey', 'Name');
$getResult = $getDE->get();
if (!empty($getResult->results)) {
foreach ($getResult->results as $result) {
print_r($getResult->results); die();
}
}
Which resulted in the exact same issue. I've attached a screenshot of the configuration of the package. But it's the same as other packages that do work.
@sfcbetiuc
Hi Again,
Appears to be a IP restriction of the API calls. Thank you for looking into the issue. It was simply a configuration issue it appears.
Describe the bug When creating a new SFMC package with legacy authentication, authentication no longer works using FuelSDK. Instead of correctly getting authenticated it throw a error
Unable to validate App Keys(ClientID/ClientSecret) provided.: Unable to validate App Keys(ClientID/ClientSecret) provided, requestToken response:{"message":"Unauthorized","errorcode":1,"documentation":""}
Using a older SFMC package client id / secret works perfectly.
To Reproduce
Expected behavior Expected it to properly return a list of available data extensions.
Screenshots None
Code snippet
Environment
The bug has the severity
Additional context Already wrote it further up. But it appears older packages work without issues but is consistent on new packages where it fails. I cannot find any information that indicates that the API has changed. Legacy authentication should be supported for a few months more to my knowledge.