Getting started overview

Integrating EVA for email validation involves a sequence of steps designed to get the API operational quickly. The initial process focuses on account creation, securing API credentials, and executing a foundational API call to verify an email address. This guide outlines the necessary actions for developers to achieve a working integration, progressing from initial setup to a successful first request and common subsequent integration patterns.

A quick reference for the essential steps is provided below:

Step What to do Where
1. Sign up Register for a new EVA account. EVA homepage
2. Get API Key Locate and copy your unique API key from the dashboard. EVA API documentation
3. Choose Integration Method Select an SDK or prepare for direct HTTP request. EVA API reference
4. Make First Call Send a basic email validation request. Your development environment
5. Interpret Response Understand the validation status and other data. EVA API response codes

Create an account and get keys

Before making any API calls, developers must establish an account with EVA. This account serves as the central point for managing usage, billing, and API credentials. The signup process is initiated from the EVA official homepage and typically requires an email address and password. Upon successful registration, users gain access to the EVA dashboard.

The API key is a unique identifier that authenticates requests made to the EVA API. It is crucial for securing access and tracking usage against the account's credit balance. To retrieve the API key:

  1. Navigate to the EVA website and log in to your newly created account.
  2. Locate the 'API Keys' or 'Dashboard' section, usually accessible from the main navigation menu after logging in.
  3. Your unique API key will be displayed. It is recommended to copy this key immediately and store it securely, as it serves as the primary credential for all API interactions. Treat it like a password to prevent unauthorized access to your EVA account and its associated credits.

EVA provides a free tier of 100 credits per month, which allows for initial testing and development without immediate financial commitment. This free tier is automatically activated upon account creation and provides sufficient resources to complete the getting started steps and explore basic functionalities.

Your first request

With an API key in hand, the next step is to execute a first email validation request. EVA supports direct HTTP requests and provides official SDKs for several programming languages, including Python, PHP, Node.js, .NET, Go, Ruby, and Java, as detailed in the EVA API documentation. For this initial example, we will demonstrate a simple HTTP GET request and then provide examples using popular SDKs.

Direct HTTP GET Request

A basic email validation request can be made by sending a GET request to the EVA API endpoint, including the email address to be validated and your API key as query parameters.

Endpoint: https://api.eva.id/v2/validate

Parameters:

  • email: The email address to validate.
  • key: Your EVA API key.
curl "https://api.eva.id/v2/[email protected]&key=YOUR_API_KEY"

Replace YOUR_API_KEY with your actual API key and [email protected] with an email address you wish to validate. A successful response will typically return a JSON object with validation results.

Example successful response:

{
  "email": "[email protected]",
  "status": "valid",
  "score": 0.95,
  "deliverability": "deliverable",
  "is_free": true,
  "is_disposable": false,
  "is_catchall": false,
  "is_syntax_valid": true,
  "domain_exists": true,
  "mx_found": true,
  "smtp_check": true,
  "reason": []
}

This response indicates that [email protected] is a valid and deliverable email address. The status field is a primary indicator of the validation outcome.

Python SDK Example

First, install the EVA Python SDK:

pip install eva-client

Then, use the SDK to make a validation request:

from eva_client import EvaClient

api_key = "YOUR_API_KEY"
eva = EvaClient(api_key)

email_to_validate = "[email protected]"
response = eva.validate_email(email_to_validate)

print(f"Email: {response['email']}")
print(f"Status: {response['status']}")
print(f"Deliverability: {response['deliverability']}")

This Python example initializes the EVA client with your API key and then calls the validate_email method, printing key aspects of the validation result.

Node.js SDK Example

First, install the EVA Node.js SDK:

npm install eva-sdk

Then, use the SDK to make a validation request:

const EvaClient = require('eva-sdk');

const apiKey = "YOUR_API_KEY";
const eva = new EvaClient(apiKey);

const emailToValidate = "[email protected]";

eva.validateEmail(emailToValidate)
  .then(response => {
    console.log(`Email: ${response.email}`);
    console.log(`Status: ${response.status}`);
    console.log(`Deliverability: ${response.deliverability}`);
  })
  .catch(error => {
    console.error('Error validating email:', error);
  });

This Node.js example demonstrates asynchronous email validation using promises, logging the email, status, and deliverability from the response.

Common next steps

After successfully completing your first email validation request, several common next steps can enhance your integration and leverage more of EVA's capabilities:

  1. Explore additional API features: The EVA API reference details various parameters and endpoints beyond basic validation, such as bulk email verification and deliverability tools. Understanding these can help tailor the service to specific application needs.

  2. Integrate into your application workflow: Begin incorporating the email validation logic into your application's user registration, lead capture, or data cleaning processes. This often involves calling the API at the point of data entry or as part of a scheduled batch process.

  3. Error handling and retry logic: Implement robust error handling to manage API rate limits, network issues, or invalid requests. For example, if an external API service like EVA returns a 5xx error code, it's often appropriate to implement a retry mechanism with exponential backoff, a common pattern described in Google Cloud's retry strategy documentation.

  4. Monitor usage and credits: Regularly check your EVA dashboard to monitor API usage and credit balance. This ensures continuous service operation and helps in planning for potential upgrades to a paid tier if your usage exceeds the free allowance.

  5. Review validation results and adjust logic: Periodically review the types of validation results (e.g., valid, invalid, unknown, disposable) and adjust your application's logic accordingly. For instance, you might decide to block registrations from disposable email addresses or flag 'unknown' statuses for manual review.

  6. Security considerations: Ensure your API key is stored securely and never exposed client-side. All API calls should originate from your server-side environment. This aligns with general API security best practices, such as those outlined by Kong's API security best practices.

Troubleshooting the first call

When making your initial API call, you might encounter issues. Here are common problems and their solutions:

  • Invalid API Key:

    • Symptom: API returns an authentication error (e.g., 401 Unauthorized or Invalid API Key message).
    • Solution: Double-check that you have copied the correct API key from your EVA dashboard. Ensure there are no leading or trailing spaces, and that the key is passed correctly in the query parameter (key=YOUR_API_KEY).
  • Missing Required Parameters:

    • Symptom: API returns a 400 Bad Request error, often indicating a missing email parameter.
    • Solution: Verify that the email parameter is present and correctly formatted in your request. For example, [email protected].
  • Network Issues:

    • Symptom: Connection timeouts or inability to reach the EVA API endpoint.
    • Solution: Check your internet connection. If using curl, ensure the URL is correct. Review any firewall or proxy settings that might be blocking outbound HTTP/HTTPS requests from your development environment.
  • Insufficient Credits:

    • Symptom: API returns an error indicating insufficient credits or account suspension.
    • Solution: Log in to your EVA account dashboard to check your remaining credit balance. If you've exhausted your free tier, consider upgrading to a paid plan.
  • Incorrect Endpoint:

    • Symptom: 404 Not Found error or unexpected response.
    • Solution: Confirm you are using the correct API endpoint, typically https://api.eva.id/v2/validate, as specified in the EVA API documentation.
  • SDK-specific Errors:

    • Symptom: Errors originating from the SDK methods or classes.
    • Solution: Consult the specific EVA SDK documentation for the language you are using. Ensure the SDK is correctly installed and imported, and that you are calling the methods with the expected parameters. Check for version compatibility issues.