Giter VIP home page Giter VIP logo

kickbox-node's Introduction

Kickbox Email Verification Service

Email Verification Library for Node.js

Kickbox determines if an email address is not only valid, but associated with a actual user. Uses include:

  • Preventing users from creating accounts on your applications using fake, misspelled, or throw-away email addresses.
  • Reducing bounces by removing old, invalid, and low quality email addresses from your mailing lists.
  • Saving money and projecting your reputation by only sending to real email users.

Getting Started

To begin, hop over to kickbox.com and create a free account. Once you've signed up and logged in, click on API Settings and then click Add API Key. Take note of the generated API Key - you'll need it to setup the client as explained below.

Installation

Make sure you have npm installed.

$ npm install kickbox

Versions

Works with Node 0.8+

Usage

var kickbox = require('kickbox').client('Your_API_Key_Here').kickbox();

kickbox.verify("[email protected]", function (err, response) {
  // Let's see some results
  console.log(response.body);
});

Options

timeout integer (optional) - Maximum time, in milliseconds, for the API to complete a verification request. Default: 6000.

// Example with options
kickbox.verify("[email protected]", {timeout: 6000}, function (err, response) {/*...*/});

Response information

A successful API call responds with the following values:

  • result string - The verification result: deliverable, undeliverable, risky, unknown
  • reason string - The reason for the result. Possible reasons are:
    • invalid_email - Specified email is not a valid email address syntax
    • invalid_domain - Domain for email does not exist
    • rejected_email - Email address was rejected by the SMTP server, email address does not exist
    • accepted_email - Email address was accepted by the SMTP server
    • low_quality - Email address has quality issues that may make it a risky or low-value address
    • low_deliverability - Email address appears to be deliverable, but deliverability cannot be guaranteed
    • no_connect - Could not connect to SMTP server
    • timeout - SMTP session timed out
    • invalid_smtp - SMTP server returned an unexpected/invalid response
    • unavailable_smtp - SMTP server was unavailable to process our request
    • unexpected_error - An unexpected error has occurred
  • role true | false - true if the email address is a role address ([email protected], [email protected], etc)
  • free true | false - true if the email address uses a free email service like gmail.com or yahoo.com.
  • disposable true | false - true if the email address uses a disposable domain like trashmail.com or mailinator.com.
  • accept_all true | false - true if the email was accepted, but the domain appears to accept all emails addressed to that domain.
  • did_you_mean null | string - Returns a suggested email if a possible spelling error was detected. ([email protected] -> [email protected])
  • sendex float - A quality score of the provided email address ranging between 0 (no quality) and 1 (perfect quality). More information on the Sendex Score can be found here.
  • email string - Returns a normalized version of the provided email address. ([email protected] -> [email protected])
  • user string - The user (a.k.a local part) of the provided email address. ([email protected] -> bob)
  • domain string - The domain of the provided email address. ([email protected] -> example.com)
  • success true | false - true if the API request was successful (i.e., no authentication or unexpected errors occurred)

Response headers

Along with each response, the following HTTP headers are included:

  • X-Kickbox-Balance - Your remaining verification credit balance (Daily + On Demand).
  • X-Kickbox-Response-Time - The elapsed time (in milliseconds) it took Kickbox to process the request.

License

MIT

Bug Reports

Report here.

Need Help?

[email protected]

kickbox-node's People

Contributors

colestrode avatar danhstevens avatar rathboma avatar schaitanya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kickbox-node's Issues

Remove deprecated and unsupported `request` library

The request library is no longer supported and depends on unsupported libraries like 'har-validator'.

This dependency should be replaced with another HTTP request library (or just use "https" built into NodeJS) so we don't have ANY dependencies (BEST IDEA!)

Request timeout option is ignored

The timeout option is ignored and the request doesn't return when expected.

The default timeout is 6 seconds, but I'm seeing requests that their response was returned after 60 seconds.

There are no tests in this library and I don't think that the timeout option works as expected.

KickBox v2.0.4
NodeJS v10.22.0
Mac OS Catalina v10.15.6

Sandbox example results in HTTP 403 then next request 500

When using the sanbox API key and test email for insufficient balance a 403 is returned as expected from the API, but then any following email always results in an HTTP 500 but ones after the 500 then result in normal operation.

var emails = [
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
    "[email protected]",
];
kickbox.verify(emails[index_checked], function (err,response) {
    if(err){
        console.log("error caught");
    } 
    if (response && response.body) {
        console.log("we have a response and thus no error");
        console.log(response.body);
    }
});

Any email at the end of the array will result in an error 500, so "[email protected]" will be the error 500 in this example.

Is this supposed to happen?

I was expecting something like it would allow all requests through even if the prior resulted in a 4xx. I understand failing the kickbox npm client if there was an actual 5xx but this seems like the http client behavior is altered to disallow further requests after the 403 (and really, do a "throw err" instead of what I did here in this example.).. I just don't think semantically this is right.

Can you look into this?
Thanks

Email gets transformed in request

The API transforms the original requested email: caps, dots (periods) get removed for some domains.. I understand why as some domains don't care. However, this doesn't seem proper of kickbox's API to do such altering when it's unsolicited.

If the email is going to be transformed via kickbox, return a reference to the original/unaltered email address.

I cannot stress the importance of this enough.

Thanks

Validating issue

Hi, Team

i am new to Kickbox.io in Node.js

i am trying to validate the email address with is deliverable or un-deliverable. but when i give the wrong email address it showing as deliverable ([email protected]) there is no email address like but it showing as deliverable.

kindly find the Code attached with this which we have used.
kickboxcode

kindly find the attached file for the test result.
kickbox

kindly check and let us know if we miss anything.

Passing API key on call (Feature request)

Hi,

There are cases (for example: a (micro)service which provides access to different local clients/keys into your service) in which the API key may not be known from the beginning and is taken after querying a database. In this case, it would be more convenient if the key was passed later as an option (with timeout) during the call and not on declaration through require.

Tia

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.