PHP code example of blackbaud / onsdk

1. Go to this page and download the library: Download blackbaud/onsdk 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/ */

    

blackbaud / onsdk example snippets



// Require the Composer autoloader.
tantiate a Blackbaud Client.
$bb = new onApiClient('SchoolUrl','Username','Password');


// get info about the current user account using the SDK.
try {
    $user = $bb->get_current_user();
    print_r($user);
} catch (Exception $e) {
    echo "There was an error getting user info.\n";
}