CampaignMonitor::getAPIKey PHP Method

getAPIKey() public method

Returns the API key for the logged-in user
public getAPIKey ( string $URL, string $username, string $password ) : string
$URL string The base URL of your CreateSend site. e.g. http://example.createsend.com/
$username string The CM account username.
$password string The CM account password.
return string
    public function getAPIKey($URL, $username, $password)
    {
        // set parameters
        $parameters['siteurl'] = (string) $URL;
        // make the call
        $result = $this->doCall('apikey', $parameters, 'GET', true);
        // return the result
        return $result['ApiKey'];
    }