PHP code example of mailxpert / php-sdk

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

    

mailxpert / php-sdk example snippets


$mailxpert = new Mailxpert([
    'app_id' => $appId,
    'app_secret' => $appSecret 
]);

<a href=" echo $mailxpert->getLoginHelper()->getLoginUrl($redirectUrl); 

if (isset($_REQUEST['code'])) {
    $accessToken = $mailxpert->getLoginHelper()->getAccessToken($redirectUrl);
}

$data = json_decode($mailxpert->sendRequest('GET','/contact_lists',[], $accessToken), true);
$contactLists = $data['data'];

$mailxpert->setAccessToken($access_token);

$mailxpert->sendRequest('GET','/contact_lists');
bash
composer