PHP code example of newsletter2go / api

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

    

newsletter2go / api example snippets



namespace NL2GO;

//Import the standalone class in your working directory
  =  "login email address";
$userPassword  =  "login password";

//Instantiate the Newsletter2Go_REST_Api 
$api  =  new  Newsletter2Go_REST_Api($authKey,  $userEmail,  $userPassword);

//Allow SSL check
$api->setSSLVerification(true);

//Retrieve and display all the contact lists stored your account
$lists  =  $api->getLists();
var_dump($lists);