Download the PHP package jpikowski/criteo-mapi-php-client without Composer
On this page you can find all versions of the php package jpikowski/criteo-mapi-php-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jpikowski/criteo-mapi-php-client
More information about jpikowski/criteo-mapi-php-client
Files in jpikowski/criteo-mapi-php-client
Package criteo-mapi-php-client
Short Description A PHP Client For Criteo MAPI Requests
License MIT
Homepage https://github.com/joepikowski/criteo-mapi-php-client
Informations about the package criteo-mapi-php-client
Criteo PHP MAPI Client
Features
- Authentication retry system
- Inline code documentation
- Save reporting results to file
Installation
The Criteo MAPI package can be installed via Composer:
Once installed, make sure your dependencies are included via the autoloader:
Basic Code Examples
Initialization
A Basic Request
Results from an API request are returned as an associative array of results.
Authentication Retry
Oauth2 Tokens retrieved from the /oauth2/token
endpoint are valid for 5 minutes.
For the first request after initialization, the MAPI Client will request an authentication token based on the username and password provided and proceed with the request.
First Request (No Stored Auth)
For subsequent requests, the stored token may have become invalid for long-running processes. The MAPI Client will automatically detect the need for a refreshed token and retry a request that fails once because of a 401 Unauthorized
error.
Request with Expired or Invalid Token
Other Features
Saving Reports to File
For reporting API calls, a filepath can be provided to optionally save results to a local path.
Further Documentation
MAPI Documentation (Criteo Help Center)
MAPI Spec and Test Tool (Swagger)
License
MIT