2017 © Pedro Peláez

adpmarketplace-apimodule api-userinfo



  • Thursday, March 2, 2017
  • by adpmarketplace
  • Repository
  • 11 Watchers
  • 2 Stars
  • 68 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 8 % Grown


ADP Marketplace Partners

There are a few pre-requesites that you need to fullfill in order to use this library: - Replace the certifcates in this library with the ones you recieved from the CSR Tool - Update the client id and client secret with the ones supplied in your credentials document PDF - Update endpoints from https://iat-api.adp.com and https://iat-accounts.adp.com to https://api.adp.com and https://accounts.adp.com., (*1)

ADP Client Userinfo Library for PHP

The ADP Client Userinfo Library is intended to simplify and aid the process of retrieving Userinfo from the ADP Marketplace API Gateway. The Library includes a sample application that can be run out-of-the-box to connect to the ADP Marketplace API test gateway., (*2)

The installation and use of this library makes the following assumptions:, (*3)

  • You must be running php5.3 or higher with CURL support. If you are using OSX, this means you will need to rebuild PHP with CURL support.
  • Composer is installed and configured, as the library utilizes Composer for installation.


1.0.2, (*4)


Composer, (*5)

Use Composer from the location you wish to use as the root folder for your project., (*6)

$ composer require adpmarketplace/api-userinfo

This will install the Userinfo module to your project. If you have not already installed the Connection module, it will automatically be downloaded and installed as well., (*7)

If you wish to build the sample client, do the following:, (*8)

$ cd adplib/connection/tools
$ php makeclient.php

If you want to test immediately, copy and paste the proper commands that are generated by the makeclient.php script. In case you missed them, you can do it this way as well:, (*9)

(from the project root)
$ cd client
$ php -S

This starts an HTTP server on port 8889 (this port must be unused to run the sample application)., (*10)

Run the sample app, (*11)

Note, to test the sample app you must first run the makeclient.php script, and then start the PHP server as outlined above., (*12)

Once this is done, open your web browser and go to:, (*13)


The sample app allows you to connect to the ADP test API Gateway for testing the Userinfo call. Please note that only "Authorization Code" is valid for calling the Userinfo api., (*14)


Call userinfo (this assumes you already have a valid connection)

require("config.php"); require($libroot . "connection/adpapiConnection.class.php"); require($libroot . "userinfo/adpapiUserinfo.class.php"); //-------------------------- // Create the helper class //-------------------------- try { $userInfoHelper = new adpapiUserinfoHelper($adpConn); } catch (adpException $e) { showADPException($e); exit(); } //------------------------------------------- // Get the info back from the userinfo call //------------------------------------------- try { $userInfo = $userInfoHelper->getUserinfo(); } catch (adpException $e) { showADPException($e); exit(); } //------------------------------------------- // Success. We have a userinfo value object. //------------------------------------------- echo "

User Info

\n"; echo "


echo "

API Documentation

Documentation on the individual API calls provided by the library are documented in the 'doc' folder. Open the index.html file in your browser to view the documentation., (*15)


This library has the following dependencies., (*16)

  • adpmarketplace/api-connection - Automatically installed via composer.
  • php >= v5.3 with CURL support. If you are using OSX, this means you will need to rebuild PHP with CURL support.
  • composer


Our testing and code coverage is handled through PHPUNIT, which you must install to run the tests. For code coverage to work, you must also have Xdebug installed. The test units are located in the "test" folder, and the configurations are already loaded into the phpunit.xml. In order to run the tests and view code coverage:, (*17)



You must use PHP's built-in linter to validate the structure of your code:, (*18)

php -l <sourcefile>


To contribute to the library, please generate a pull request. Before generating the pull request, please insure the following:, (*19)

  1. Appropriate unit tests have been updated or created.
  2. Code coverage on the unit tests must be no less than 95%.
  3. Your code updates have been fully tested and linted with no errors.
  4. Update README.md and API documentation as appropriate.


This library is available under the Apache 2 license (http://www.apache.org/licenses/LICENSE-2.0)., (*20)

The Versions

02/03 2017



  Sources   Download


The Requires


02/03 2017
05/05 2016
23/03 2016
01/03 2016