Git Product home page Git Product logo

Comments (5)

sfdrogojan avatar sfdrogojan commented on August 17, 2024

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.

danniehansen avatar danniehansen commented on August 17, 2024

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.

 avatar commented on August 17, 2024

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:

  1. Copied the CampaignTest.php test class and renamed it to PhpIssueTest.php
  2. 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'));

  1. 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 theparamsconstructor parameter and you also have aconfig.phpfile that is overwriting some of the parameters that you provided in the constructorparamsparameter.

from fuelsdk-php.

danniehansen avatar danniehansen commented on August 17, 2024

@sfcbetiuc

Hi,

Sorry for the late response. That's really odd. Tried doing something similar.

  1. Created a new directory
  2. Ran composer init
  3. Added fuelsdk
  4. 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();
  }
}
  1. 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.

Screen Shot 2019-06-28 at 11 03 53 AM

from fuelsdk-php.

danniehansen avatar danniehansen commented on August 17, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.