SDKs overview
Verifier offers a set of official SDKs designed to facilitate integration with its email verification API. These SDKs abstract much of the underlying HTTP request and response handling, allowing developers to focus on implementing email validation logic within their applications. The primary goal of these SDKs is to simplify access to Verifier's core functionalities, such as real-time email verification and bulk list cleaning, across popular programming languages.
The Verifier API itself is a RESTful service, which means it communicates over standard HTTP methods and typically uses JSON for data exchange. While direct HTTP requests can be made using tools like cURL for command-line interactions, SDKs provide a more idiomatic and efficient way to interact with the API within a specific language environment. This includes managing API keys, constructing request bodies, and parsing JSON responses into native data structures.
Developers can choose an SDK that aligns with their project's primary programming language to streamline development. The official documentation provides comprehensive guides for API integration, including detailed explanations of endpoints and parameters for both real-time validation and bulk email verification processes.
Official SDKs by language
Verifier provides official SDKs and client libraries for several widely used programming languages. These libraries are maintained by Verifier to ensure compatibility and provide a consistent developer experience. Each SDK wraps the core API functionalities, offering language-specific methods for email validation tasks.
| Language | Package/Module | Installation Command (Example) | Maturity |
|---|---|---|---|
| Node.js | verifier-sdk |
npm install verifier-sdk or yarn add verifier-sdk |
Stable |
| PHP | verifier/verifier-php |
composer require verifier/verifier-php |
Stable |
| Python | verifier-python |
pip install verifier-python |
Stable |
| Ruby | verifier-ruby |
gem install verifier-ruby |
Stable |
| Go | github.com/verifier/go-sdk |
go get github.com/verifier/go-sdk |
Stable |
| Java | com.verifier:java-sdk |
Maven: <dependency><groupId>com.verifier</groupId><artifactId>java-sdk</artifactId><version>X.Y.Z</version></dependency> |
Stable |
Each SDK is designed to handle common API interactions, including setting authentication credentials (your API key), making requests to the validation endpoints, and processing the structured responses. For detailed usage instructions and specific method signatures, developers should consult the Verifier official documentation.
Installation
Installing Verifier SDKs typically involves using the package manager specific to the programming language or environment. The following examples demonstrate common installation procedures for some of the most popular official SDKs.
Node.js
For Node.js projects, the SDK is available via npm or Yarn:
npm install verifier-sdk
# or
yarn add verifier-sdk
PHP
PHP projects commonly use Composer for dependency management:
composer require verifier/verifier-php
Python
Python packages are installed using pip:
pip install verifier-python
Ruby
Ruby applications use RubyGems:
gem install verifier-ruby
Go
Go modules are managed with the go get command:
go get github.com/verifier/go-sdk
Java
For Java, if using Maven, add the dependency to your pom.xml file. Replace X.Y.Z with the latest stable version from the Verifier documentation:
<dependencies>
<dependency>
<groupId>com.verifier</groupId>
<artifactId>java-sdk</artifactId>
<version>X.Y.Z</version>
</dependency>
</dependencies>
Analogous instructions apply for Gradle or other build systems. Always refer to the specific SDK's documentation for the most current and detailed installation steps.
Quickstart example
The following quickstart examples demonstrate how to perform a basic email validation using the Verifier SDKs. These snippets assume you have already installed the respective SDK and have your Verifier API key ready. Replace YOUR_API_KEY with your actual API key, which can be found in your Verifier account dashboard.
Node.js Quickstart
const Verifier = require('verifier-sdk');
const verifier = new Verifier('YOUR_API_KEY');
async function validateEmail() {
try {
const response = await verifier.validate('[email protected]');
console.log('Email validation result:', response.data);
// Example response structure:
// {
// "email": "[email protected]",
// "status": "valid",
// "reason": "none",
// "score": 0.9,
// "disposable": false,
// "free_email": true,
// "domain": "example.com",
// "top_level_domain": "com",
// "syntax_valid": true,
// "mx_found": true,
// "smtp_check": true,
// "catch_all": false,
// "gibberish": false,
// "success": true
// }
} catch (error) {
console.error('Error validating email:', error.message);
}
}
validateEmail();
PHP Quickstart
<?php
require_once 'vendor/autoload.php'; // Adjust path if necessary
use Verifier\Client as VerifierClient;
$apiKey = 'YOUR_API_KEY';
$verifier = new VerifierClient($apiKey);
try {
$response = $verifier->validate('[email protected]');
echo 'Email validation result: ' . print_r($response, true) . "\n";
// The response object contains properties like $response->status, $response->email, etc.
} catch (Exception $e) {
echo 'Error validating email: ' . $e->getMessage() . "\n";
}
?>
Python Quickstart
from verifier import Client
api_key = 'YOUR_API_KEY'
verifier = Client(api_key)
try:
response = verifier.validate('[email protected]')
print(f"Email validation result: {response}")
# The response is typically a dictionary or object with attributes like status, email, etc.
except Exception as e:
print(f"Error validating email: {e}")
These examples demonstrate the basic pattern: initialize the client with your API key, then call the validate method with the email address. The response object will contain detailed information about the email's validity and other characteristics, as outlined in the Verifier API reference for single email verification.
Community libraries
While Verifier maintains official SDKs for core languages, the open-source community may also develop and contribute libraries for additional languages or specific frameworks. These community-contributed libraries are often found on platforms like GitHub or language-specific package repositories (e.g., PyPI for Python, RubyGems for Ruby, npm for Node.js).
When considering a community library, it is advisable to check several factors:
- Maintenance Status: Verify if the library is actively maintained and regularly updated to ensure compatibility with the latest API versions and security patches.
- Documentation: Good community libraries should have clear and comprehensive documentation, including installation instructions, usage examples, and API coverage.
- Community Support: Look for indicators of an active community, such as issues being addressed, pull requests reviewed, and discussions on forums or GitHub.
- License: Understand the licensing terms under which the library is distributed to ensure it is compatible with your project's requirements. Most open-source libraries use permissive licenses like MIT or Apache 2.0, as described by the Open Source Initiative.
- API Coverage: Confirm that the library covers the specific Verifier API endpoints and functionalities your application requires.
As of this writing, Verifier primarily promotes its official SDKs, which are the recommended path for integration due to direct support and guaranteed compatibility. Developers seeking community libraries for less common languages or specialized use cases should search the respective language's package ecosystem or GitHub for third-party implementations, always exercising due diligence in evaluating their suitability.