Comments (5)
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',
));
from fuelsdk-php.
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.
from fuelsdk-php.
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:
- Copied the CampaignTest.php test class and renamed it to PhpIssueTest.php
- Replaced this
$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'));
- Ran the PhpIssueTest.php tests.
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.
from fuelsdk-php.
@sfcbetiuc
Hi,
Sorry for the late response. That's really odd. Tried doing something similar.
- Created a new directory
- Ran composer init
- Added fuelsdk
- Creates a test.php file containing (with x replaced):
<?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();
}
}
- Opened the file in the browser.
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.
from fuelsdk-php.
@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.
from fuelsdk-php.
Related Issues (20)
- Is there no way to pull from all business units?
- Trying to filter DataExtensions using a Client.ID but we get Filter Property 'Client.ID' is not a retrievable property HOT 10
- "Error: API Permission Failed." in ET_Get.php HOT 2
- [BUG] config.php file is already present in my project HOT 5
- [BUG]
- Triggered Send Attributes? HOT 1
- Adding data for a triggered send HOT 1
- Connecting from a local environment HOT 1
- Unable to validate App Keys(ClientID/ClientSecret) w/ Php 7.4.x [BUG] HOT 3
- ET_GetSupportRest does not support URLProps and MoreResults logic not working HOT 1
- ET_DataExtension_Row extends but does not implement Upserts HOT 1
- [Enhancement] Maintain these packages?
- [undefined array index in ET_Client.php in function getAuthTokenExpiration if $tenantKey and $this->tenantTokens are null] HOT 8
- print_r in ET_Perform
- [BUG] PHP 8: Deprecated function: trim(): Passing null to parameter of type string is deprecated.
- [Enhancement] Support firebase/php-jwt version 6
- [BUG] Trying to access array offset on value of type null in ET_Client.php on line 645
- [BUG] php8.0 or upper
- OAuth error on SOAP request HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuelsdk-php.