Use this code to integrate Email Hippo’s MORE API using VB.net. 



'

'******************************************************************************************

' Company:

' © 2017, Email Hippo Limited. (http://emailhippo.com)

'

' File name:

' API V3 - VB Example.vb

'

' Version:

' 1.0.20170508.0

'

' Version control:

' - 1.0.20170508.0 - initial release

'

' Date:

' May 2017

'

' Description:

' Demonstrates how to call a RESTful service @ //api.hippoapi.com/v3/more/json

' using VB.

'

' This example requires a valid key to work correctly.

'

' License:

' Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0)

'******************************************************************************************

'


Imports System.IO

Imports System.Net



''' <summary>

''' The program.

''' </summary>

Friend Class Program

#Region "Constants"


    ''' <summary>

    ''' The api url.

    ''' </summary>

    Private Const ApiUrl As String = "https://api.hippoapi.com/v3/more/json"


    ''' <summary>

    ''' 0 = ApiUrl

    ''' 1 = API Key

    ''' 2 = Email address to query

    ''' </summary>

    Private Const QueryFormatString As String = "{0}/{1}/{2}"


    ''' <summary>

    ''' The your api key.

    ''' </summary>

    ''' <remarks>

    ''' /*ENTER YOUR API KEY HERE*/

    ''' </remarks>

    Private Const YourAPIKey As String = "<!-- ENTER A VALID KEY HERE-->"


#End Region


#Region "Methods"


    ''' <summary>

    ''' The main program entry point.

    ''' </summary>

    ''' <param name="args">

    ''' The args.

    ''' </param>

    Private Shared Sub Main(args As String())

        Console.WriteLine("Input email address to verify")


        Dim readLine = Console.ReadLine()


        Console.WriteLine(String.Empty)


        Dim requestUrl = String.Format(QueryFormatString, ApiUrl, YourAPIKey, readLine)


        Dim myRequest = DirectCast(WebRequest.Create(requestUrl), HttpWebRequest)


        Dim webResponse As WebResponse = Nothing


        Try

            webResponse = myRequest.GetResponse()


            Using reader = New StreamReader(webResponse.GetResponseStream())

                Dim jsonString = reader.ReadToEnd()


                Console.ForegroundColor = ConsoleColor.Green

                Console.WriteLine("Result:")

                Console.WriteLine(jsonString)

                Console.ResetColor()

                Console.WriteLine("Press <Enter> to continue..")

                Console.ReadLine()

            End Using

        Catch exception As Exception

            Console.WriteLine("An error occured:")

            Console.ForegroundColor = ConsoleColor.Red

            Console.WriteLine("Exception reported: {0}", exception.Message)

            Console.ResetColor()

            Console.WriteLine("Press <Enter> to continue..")

            Console.ReadLine()

        Finally

            If webResponse IsNot Nothing Then

                webResponse.Dispose()

            End If

        End Try

    End Sub


#End Region

End Class