Skip to content

kiwicom/gozerobounce

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoZeroBounce

Go implementation for ZeroBounce Email Validation API v2

THIS PROJECT IS STILL IN DEVELOPMENT!

Installation and Usage

go get github.com/kiwicom/gozerobounce

You can use it like this:

package main

import (
    "fmt"
    "os"

    "github.com/kiwicom/gozerobounce"
)

func main() {

    gozerobounce.APIKey = "... Your API KEY ..." 

    // For Querying a single E-Mail and IP
    // IP can also be an empty string
    response := gozerobounce.Validate("[email protected]", "123.123.123.123")

    // Now you can check status
    if response.Status == "valid" {
        fmt.Println("This email is valid")
    }

    // .. or Substatus
    if response.SubStatus == "disposable" {
        fmt.Println("This email is disposable")
    }

    // You can also check your credits 
    credits := gozerobounce.GetCredits()
    fmt.Println("Credits left:", credits.Credits)
}

Already implemented

  • Validate single email
  • Get credits

About

Go implementation for ZeroBounce API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%