PHP code example of helgesverre / snov-io

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

    

helgesverre / snov-io example snippets


return [
    'client_id' => env('SNOV_CLIENT_ID'),
    'client_secret' => env('SNOV_CLIENT_SECRET'),
];

use HelgeSverre\Snov\Snov;

// Instantiate the client
$snov = new Snov(
    clientId: config('snov-io.client_id'),
    clientSecret: config('snov-io.client_secret'),
);

// Authenticate the client
$snov->authenticate($snov->getAccessToken());

// Call the API with a request
$snov->send(new EmailCountRequest(
    domain: "snov.io",
));

$snov = new Snov(
    clientId: config('snov-io.client_id'),
    clientSecret: config('snov-io.client_secret'),
);

// No need to authenticate the client, the resource method will do it automatically
$snov->emailFinder()->emailCount(
    domain: "snov.io",
);

Snov::dripCampaigns();
Snov::emailFinder();
Snov::emailVerifier();
Snov::prospectManagement();
Snov::userAccount();

Snov::dripCampaigns()->changeRecipientsStatus($email, $campaignId, $status);
Snov::dripCampaigns()->seeListOfCompletedProspects($campaignId);
Snov::dripCampaigns()->seeCampaignReplies($campaignId);
Snov::dripCampaigns()->getInfoAboutCampaignOpens($campaignId);
Snov::dripCampaigns()->checkLinkClicks($campaignId);
Snov::dripCampaigns()->viewSentEmails($campaignId);
Snov::dripCampaigns()->addToDoNotEmailList($items, $listId);

Snov::emailFinder()->domainSearchV2($domain, $type, $limit, $lastId, $positions);
Snov::emailFinder()->emailCount($domain);
Snov::emailFinder()->emailFinder($firstName, $lastName, $domain);
Snov::emailFinder()->addNamesToFindEmails($firstName, $lastName, $domain);
Snov::emailFinder()->addURLToSearchForProspect($url);
Snov::emailFinder()->getProspectWithURL($url);
Snov::emailFinder()->getProfileWithEmail($email);

Snov::emailVerifier()->emailVerifier($emails)
Snov::emailVerifier()->addEmailsForVerification($emails)


Snov::prospectManagement()->addProspectToList(
    $email,
    $fullName,
    $firstName,
    $lastName,
    $phones,
    $country,
    $locality,
    $position,
    $companyName,
    $companySite,
    $updateContact,
    $customFields,
    $socialLinks,
    $listId,
);
Snov::prospectManagement()->findProspectByID($id);
Snov::prospectManagement()->findProspectByEmail($email);
Snov::prospectManagement()->viewProspectsInList($listId, $page, $perPage);
Snov::prospectManagement()->createNewProspectList($name);

Snov::userAccount()->checkUserBalance();

Snov::webhooks()->listAllWebhooks();
Snov::webhooks()->addWebhook($eventObject, $eventAction, $endpointUrl,);
Snov::webhooks()->changeWebhookStatus($status,);
Snov::webhooks()->deleteAWebhook();
shell
# Generate the API spec
php ./bin/generate.php

# Generate the Resource and Request classes from the API spec
php ./bin/codegen.php

# Format the generated code
composer format