<?php // Autoload Stuff require_once 'vendor/autoload.php'; use EVETools\APIHandler\CREST\Handler; // Build the Handler $handler = new Handler(['callback' => 'CALLBACK', 'client_id' => 'CLIENT_ID', 'client_secret' => 'SECRET']); // Get the redirect URL for the SSO. // It takes an array of scopes. echo $handler->redirect(['publicData', 'characterLocationRead', 'someOtherScope']);
<?php // Autoload stuff require_once 'vendor/autoload.php'; use EVETools\APIHandler\CREST\Handler; // New up the handler $handler = new Handler(['callback' => 'CALLBACK', 'client_id' => 'CLIENT_ID', 'client_secret' => 'SECRET']); // Grab an access_token from the authorization_code. try { $auth = $handler->authorize($_REQUEST['code']); dump($auth); } catch (\Exception $err) { dump($err->response()); } $response = $handler->request('oauth/verify'); dump($response);