PHPackages                             muglug/fuel-sdk-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. muglug/fuel-sdk-php

ActiveLibrary[API Development](/categories/api)

muglug/fuel-sdk-php
===================

ExactTarget Fuel SDK for PHP

0.10(5y ago)039.6kMITPHPPHP &gt;=5.2.3

Since Jan 29Pushed 5y agoCompare

[ Source](https://github.com/muglug/FuelSDK-PHP)[ Packagist](https://packagist.org/packages/muglug/fuel-sdk-php)[ Docs](https://code.exacttarget.com/apis-sdks/fuel-sdks/)[ RSS](/packages/muglug-fuel-sdk-php/feed)WikiDiscussions Dot9 Synced 4w ago

READMEChangelog (1)DependenciesVersions (4)Used By (0)

FuelSDK-PHP
===========

[](#fuelsdk-php)

ExactTarget Fuel SDK for PHP

Overview
--------

[](#overview)

The Fuel SDK for PHP provides easy access to ExactTarget's Fuel API Family services, including a collection of REST APIs and a SOAP API. These APIs provide access to ExactTarget functionality via common collection types such as array/hash.

New Features in Version .9
--------------------------

[](#new-features-in-version-9)

- **Streamlined Folder Support**: All objects that support folders within the UI now have a standardized property called folderId.
- **Interaction Support**: Now supports Import and Email\_SendDefinition objects .
- **Profile Attribute Support**: Added the ability to manage profile attributes through the ProfileAttribute object.
- **Support for single request to Add/Update**:A single request can be made which will create the object if one doesn't already or update one if it does. This works for Subscriber, DataExtension\_Row, and List objects using the Put method.
- **Tracking Events Batching Support**: By default, all tracking event types will only pull new data since the last time a request was made using the same filter. If you would like to override this functionality to pull all data, simply set the GetSinceLastBatch property to false.
- **Automatic Asset Organization for Hub Apps**: Applications that authenticate by providing a JWT will automatically have all created assets placed into a folder based on the HubExchange app's name.
- \*\*Greater Flexibility for Authentication \*\*: Previously the application keys required for authentication had to be hard-coded in a php config file. While this option is still available, an additional option to pass these at the time the ET\_Client class is instantiated allows has been added.
- **Easier Troubleshooting**: The ability to log the full payload for API requests that are happening behind the scenes has been added in the SDK in order to make troubleshooting issues easier.

Requirements
------------

[](#requirements)

PHP Version 5.2.3

Extensions:

- mcrypt
- openssl
- SOAP

Getting Started
---------------

[](#getting-started)

After downloading the project, rename the config.php.template file to config.php.

Edit config.php so you can input the ClientID and ClientSecret values provided when you registered your application. If you are building a HubExchange application for the Interactive Marketing Hub then, you must also provide the Application Signature (appsignature). Only change the value for the defaultwsdl configuration item if instructed by ExactTarget.

See the ET\_Client section below for details on how to specify these values at the time the ET\_Client object is instantiated if you would prefer to store the ClientID and ClientSecret values in a database or other configuration storage mechanism.

If you have not registered your application or you need to lookup your Application Key or Application Signature values, please go to App Center at [Code@: ExactTarget's Developer Community](http://code.exacttarget.com/appcenter "Code@ App Center").

Example Request
---------------

[](#example-request)

All ExactTarget objects exposed through the Fuel SDK begin with be prefixed with "ET\_". Start by working with the ET\_List object:

Add a require statement to reference the Fuel SDK's functionality:

> require('ET\_Client.php');

Next, create an instance of the ET\_Client class:

> $myclient = new ET\_Client();

Create an instance of the object type we want to work with:

> $getList = new ET\_List();

Associate the ET\_Client to the object using the authStub property:

> $getList-&gt;authStub = $myclient;

Utilize one of the ET\_List methods:

> $getResponse = $getList-&gt;get();

Print out the results for viewing

> print\_r($getResponse);

**Example Output:**

```
ET_Get Object
(
    [status] => 1
    [code] => 200
    [message] =>
    [results] => Array
        (
            [0] => stdClass Object
                (
                    [Client] => stdClass Object
                        (
                            [ID] => 1000001
                            [PartnerClientKey] =>
                        )

                    [PartnerKey] =>
                    [CreatedDate] => 2009-06-12T14:42:06.1
                    [ModifiedDate] => 2011-08-17T14:50:30.697
                    [ID] => 1718921
                    [ObjectID] => f41c7d1b-8957-de11-92ee-001cc494ae9e
                    [CustomerKey] => All Subscribers - 578623
                    [ListName] => All Subscribers
                    [Category] => 578623
                    [Type] => Private
                    [Description] => Contains all subscribers
                    [ListClassification] => ExactTargetList
                )

        )

    [request_id] => 5d56a37e-4b13-4f0a-aa13-2e108e60a990
    [moreResults] =>
)
```

ET\_Client Class
----------------

[](#et_client-class)

The ET\_Client class takes care of many of the required steps when accessing ExactTarget's API, including retrieving appropriate access tokens, handling token state for managing refresh, and determining the appropriate endpoints for API requests. In order to leverage the advantages this class provides, use a single instance of this class for an entire session. Do not instantiate a new ET\_Client object for each request made.

The ET\_Client class accepts multiple parameters

**Refresh WSDL** - If set to true, it will automatically download a local copy of the WSDL whenever an update is found.

> $myclient = new ET\_Client(true);

**Debug** - If set to true, all API requests that the Fuel SDK is making behind the scenes will be logged to PHP's error log. This option should only be set to true in order to troubleshoot during the development process and should never be used in a production scenario.

> $myclient = new ET\_Client(true,true);

**Parameters** - Allows for passing authentication information for use with SSO with a JWT or for passing ClientID/ClientSecret if you would prefer to not use the config file option.

Example passing JWT:

> $myclient = new ET\_Client(true, array("jwt"=&gt;"JWT Values goes here"));

Example passing ClientID/ClientSecret:

> $myclient = new ET\_Client(true, array("clientid" =&gt; "3bjbc3mg4nbk64z5kzczf89n", "clientsecret"=&gt;"ssnGAPvZg6kmm775KPj2Q4Cs"));

Responses
---------

[](#responses)

All methods on Fuel SDK objects return a generic object that follows the same structure, regardless of the type of call. This object contains a common set of properties used to display details about the request.

- status: Boolean value that indicates if the call was successful
- code: HTTP Error Code (will always be 200 for SOAP requests)
- message: Text values containing more details in the event of an error
- results: Collection containing the details unique to the method called.

Get Methods also return an addition value to indicate if more information is available (that information can be retrieved using the getMoreResults method):

- moreResults - Boolean value that indicates on Get requests if more data is available.

Samples
-------

[](#samples)

Find more sample files that illustrate using all of the available functions for ExactTarget objects exposed through the API in the objsamples directory.

Sample List:

- [BounceEvent](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-bounceevent.php)
- [Campaign](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-campaign.php)
- [ClickEvent](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-clickevent.php)
- [ContentArea](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-contentarea.php)
- [DataExtension](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-dataextension.php)
- [Email](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-email.php)
- [List](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-list.php)
- [List &gt; Subscriber](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-list.subscriber.php)
- [OpenEvent](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-openevent.php)
- [SentEvent](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-sentevent.php)
- [Subscriber](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-subscriber.php)
- [TriggeredSend](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-triggeredsend.php)
- [UnsubEvent](https://github.com/ExactTarget/FuelSDK-PHP/blob/master/objsamples/sample-unsubevent.php)

Copyright and license
---------------------

[](#copyright-and-license)

Copyright (c) 2013 ExactTarget

Licensed under the MIT License (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the COPYING file.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2014 days

Total

2

Last Release

2103d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/37a992956f2ceb043547091360fe71dacdd2b227d5450e7022b2a53660ba4e44?d=identicon)[muglug](/maintainers/muglug)

---

Top Contributors

[![MichaelAllenClark](https://avatars.githubusercontent.com/u/2179972?v=4)](https://github.com/MichaelAllenClark "MichaelAllenClark (51 commits)")[![kejandre](https://avatars.githubusercontent.com/u/1123350?v=4)](https://github.com/kejandre "kejandre (3 commits)")[![muglug](https://avatars.githubusercontent.com/u/2292638?v=4)](https://github.com/muglug "muglug (2 commits)")[![Ryanjlowe](https://avatars.githubusercontent.com/u/2649375?v=4)](https://github.com/Ryanjlowe "Ryanjlowe (2 commits)")[![jfeltis](https://avatars.githubusercontent.com/u/915167?v=4)](https://github.com/jfeltis "jfeltis (1 commits)")[![dereknutile](https://avatars.githubusercontent.com/u/146833?v=4)](https://github.com/dereknutile "dereknutile (1 commits)")[![wyleiLefflanator](https://avatars.githubusercontent.com/u/17790379?v=4)](https://github.com/wyleiLefflanator "wyleiLefflanator (1 commits)")

### Embed Badge

![Health badge](/badges/muglug-fuel-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/muglug-fuel-sdk-php/health.svg)](https://phpackages.com/packages/muglug-fuel-sdk-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M474](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M186](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M95](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
