Marketo SOAP API PHP (micro-) Client
Copyright (C) 2014-2016 Gael Abadinbr/
License: [MIT Expat][1]
Version: 0.4.0-beta

, (*1)
Unofficial PHP client for the Marketo.com SOAP API: http://developers.marketo.com/documentation/soap/. Requires PHP 5.3.0+ with the SOAP extension enabled (and cURL extension for SSL support), (*2)
Installation
The recommended way of installing the client is via Composer. Simply run the following command to add the library to your composer.json file., (*3)
composer require elcodedocle/marketo-soap-api-php-client
Alternatively, you can simply add MarketoSoapClient.php to your project., (*4)
Usage example
Create a MarketoSoapApiClient object:, (*5)
require_once 'route/to/MarketoSoapApiClient.php';
use CodeCrafts\MarketoSoap\MarketoSoapApiClient;
// replace with your Marketo soap endpoint (without ?WSDL at the end)
$soapEndpoint = 'https://<YOUR-MUNCHKIN-ID>.mktoapi.com/soap/mktows/2_2';
try {
$marketoSoapApiClient = new MarketoSoapApiClient(
'<YOUR-MARKETO-API-USER-ID>',
'<YOUR-MARKETO-SECRET-KEY>',
new SoapClient(
$soapEndpoint."?WSDL",
MarketoSoapApiClient::buildOptionsArray($soapEndpoint)
)
);
} catch (SoapFault $ex){
// Error connecting to Marketo SOAP Endpoint
// ...
}
Invoke any of the implemented methods, e.g.:, (*6)
$leadCookie = ''; // fill in with some lead cookie value you want to test
var_export(
$marketoSoapApiClient->getLeadBy(
'COOKIE',
$leadCookie
)
);
will echo the processed lead obtained for $leadCookie
., (*7)
(Check the phpdoc on MarketoSoapApiClientInterface.php for info on the implemented
methods and their parameters), (*8)
TODO:
- Implement wrappers for all the missing methods. (This API implements
wrappers for only 5 out of the 23 methods marketo SOAP API provides: getLead,
syncLead, getCampaignsForSource, requestCampaign and scheduleCampaign. I don't
need to use any more methods right now, but I'll be implementing more as I need
them, and any requests will be considered and implemented in order of
popularity, so don't hessitate on opening/+1 a ticket or a pull request if you
like this code and would like to request some particular extension or implement
one yourself and have it merged into this project).
Acks
Ben Ubois, the developer behind
Marketo,
"A PHP client for the Marketo SOAP API", (*9)
Enjoy!, (*10)
(, (*11)
bitcoin: 1DMD3ymSTKoe16kNme87UnYcrXyZdkWSjD, (*12)
dogecoin: D9jDo3XPyALJH63N39wct6eDSeaL4ba5QB, (*13)
paypal: http://goo.gl/28iuK3, (*14)
), (*15)