PHP code example of ogillot / php-crisp-api

1. Go to this page and download the library: Download ogillot/php-crisp-api 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/ */

    

ogillot / php-crisp-api example snippets



$CrispClient = new Crisp();

$CrispClient->authenticate(identifier, key);

$profile = $CrispClient->userProfile->get();
$firstName = $profile["first_name"];
echo "Hello $firstName";
js
CrispClient = new Crisp();

// Authenticate to API (identifier, key)
// eg. $CrispClient->authenticate("7c3ef21c-1e04-41ce-8c06-5605c346f73e", "cc29e1a5086e428fcc6a697d5837a66d82808e65c5cce006fbf2191ceea80a0a");
$CrispClient->authenticate(identifier, key);

// Now, you can use authenticated API sections.