PHPackages                             kristenlk/marketo-client - 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. kristenlk/marketo-client

ActiveLibrary

kristenlk/marketo-client
========================

A PHP client for the Marketo REST API.

1.1(9y ago)343MITPHPPHP &gt;=7.0.0CI failing

Since Oct 27Pushed 9y ago3 watchersCompare

[ Source](https://github.com/eventfarm/marketo-client)[ Packagist](https://packagist.org/packages/kristenlk/marketo-client)[ RSS](/packages/kristenlk-marketo-client/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

marketo-client
==============

[](#marketo-client)

[![Travis](https://camo.githubusercontent.com/7258d1a22e0a5954303fd076c200f0898de9062aa3d7b67cd1eebd4171c2b641/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6576656e746661726d2f6d61726b65746f2d636c69656e742e7376673f6d61784167653d323539323030303f7374796c653d666c61742d737175617265)](https://travis-ci.org/eventfarm/marketo-client)[![Downloads](https://camo.githubusercontent.com/ecc130b0c2cbeb242e99317daace779c383b5909b47f33b6fd991ab067f0603f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6576656e746661726d2f6d61726b65746f2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eventfarm/marketo-client)[![Packagist](https://camo.githubusercontent.com/53edfc894ba8a3ac980f8bd7201513938390ef60d1f091477d814539f699510d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6576656e746661726d2f6d61726b65746f2d636c69656e742e7376673f6d61784167653d323539323030303f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eventfarm/marketo-client)[![Code Climate](https://camo.githubusercontent.com/44705bbbed5673d970c653b5f3ba6bba779475d42423ac11afe5bfa2265becf0/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6576656e746661726d2f6d61726b65746f2d636c69656e742f6261646765732f6770612e737667)](https://codeclimate.com/github/eventfarm/marketo-client)[![Test Coverage](https://camo.githubusercontent.com/e33bf568bdc4b5ed4035e0265ec0b0ef1f0106c95f25a5431c6bc8e610378965/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6576656e746661726d2f6d61726b65746f2d636c69656e742f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/eventfarm/marketo-client/coverage)

This package provides an interface for interacting with the Marketo REST API.

Installation
------------

[](#installation)

```
$ composer require eventfarm/marketo-client

```

Or add the following lines to your `composer.json` file:

```
{
    "require": {
        "eventfarm/marketo-client": "dev-master"
    }
}
```

```
$ composer install
```

Project Defaults
----------------

[](#project-defaults)

In order to get you up and running as easily as possible, we provide default implementations of a REST client and Marketo provider to use in combination with this package.

- We've chosen to use [Guzzle](https://github.com/guzzle/guzzle) for sending HTTP requests
- We've chosen to use [The PHP League's Oauth Client](https://github.com/thephpleague/oauth2-client) and my [Marketo provider](https://github.com/kristenlk/oauth2-marketo) for Marketo authentication and token refresh.

### Guzzle REST Client

[](#guzzle-rest-client)

Our REST client implements the PSR-7 HTTP message interface.

You can either use the provided [GuzzleRestClient](./src/RestClient/GuzzleRestClient.php) or have your own that implements our [RestClientInterface](./src/RestClient/RestClientInterface.php).

### KristenlkMarketoProvider

[](#kristenlkmarketoprovider)

Our default Marketo provider is my [Marketo Provider](https://github.com/kristenlk/oauth2-marketo) library.

You can either use the provided [KristenlkMarketoProvider](./src/Oauth/KristenlkMarketoProvider.php) or use your own that implements our [MarketoProviderInterface](./src/Oauth/MarketoProviderInterface.php).

Example Client Implementation
-----------------------------

[](#example-client-implementation)

```
