Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Intro

This is a first of a new family of API methods that requires an API key in order to use it.

For now you will need to ask Ongage Support to generate a Secret API Key for you.

The Secret API Key uses JSON Web Token (JWT) authentication for securely transmitting information between web and server applications to Ongage.

The New API Header Authentication

This is the new API Authentication, and replaces the Username Password authentication described in our API Getting Started guide.

API Header

x-api-key: <THE_SECRET_KEY_HERE>

The New API URL Endpoint

https://api.ongage.io/

Real-Time Email Validation Method

Note: This methods accepts only one email address per call. The response time for this call is typically seconds.

API Request

POST https://api.ongage.io/email-validation/api/v1/realtime-validation
Header: 
x-api-key: THE_SECRET_KEY_HERE
Body: 
{ “email”@”address.com”}

Response

{
    "status": "Deliverable",
    "reason": "accepted_email"
}

The status can be anyone of the following:

  • Deliverable

  • Unknown

  • Risky

  • Undeliverable

An explanation of those and the reasons you can find in our Validation online help page.

Error Response

Following are possible error responses one can get.

Out of Validation Credits

{
  "metadata": {
    "error": true
  },
  "payload": {
    "code": 402,
    "errors": [],
    "message": "Not enough credits in your account"
  }
}

Invalid API Key

{
  "metadata": {
    "error": true
  },
  "payload": {
    "code": 400,
    "errors": [],
    "message": "Invalid API key"
  }
}

Additional Information

Screenshot of the POST API Header

  • No labels