PHP code example of neclimdul / marketo-rest

1. Go to this page and download the library: Download neclimdul/marketo-rest library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

neclimdul / marketo-rest example snippets



$system_config = ;
$client = \NecLimDul\MarketoRest\ClientFactory::createOauthClient(new \NecLimDul\MarketoRest\Configuration([
    'clientId' => 'ASDFASDF',
    'clientSecret' => 'ASDFASDF',
    'baseUrl' => 'https://example.mktorest.com',
]));
$config = \NecLimDul\MarketoRest\LeadConfiguration::getDefaultConfiguration();
$config->setHost('https://example.mktorest.com');
$service = new \NecLimDul\MarketoRest\LeadsApi($client, $config);
$service->getLeadByIdUsingGET(16);