Authentication help - 2Parale/2Performant-php GitHub Wiki
Obtaining an access token is pretty straightforward using the API wrapper:
list($email, $password) = getCredentialsFromDatabase();
$affiliate = new \TPerformant\API\HTTP\Affiliate($email, $password);
The only time you need anything else is when you want to test your implementation on the sandbox version of 2Performant. In that case, you must
\TPerformant\API\Api::init('http://sandbox-api.2performant.com');
$affiliate = new \TPerformant\API\HTTP\Affiliate($email, $password);
Lear more about reusing authentication tokens.