PHP code example of cyberuslabs / cyberkey

1. Go to this page and download the library: Download cyberuslabs/cyberkey library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cyberuslabs / cyberkey example snippets




$cyberkey = new Cyberuslabs\Cyberkey(
  '[CLIENT_ID]',
  '[SECRET_KEY]',
  '[REDIRECT_URL]'
);

try {
  $result = $cyberkey->authenticate();
  var_dump($result);
  // $result will contain object with all  your profile information.
} catch(Exception $e) {
  echo 'Caught exception: ',  $e->getMessage(); 
}

// In case you need to change these
$cyberkey->set_public_key('[PUBLIC_KEY]');
$cyberkey->set_api_address('[API_ADDRESS]');