Use this code to integrate Email Hippo’s MORE API using C#. 


/*

 *******************************************************************************************

 * Company:

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

 *

 * File name:

 * API V3 - C# Example.cs

 *

 * 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 C#.

 *

 * This example requires a valid key to work correctly.

 *

 * License:

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

 *******************************************************************************************

*/


#region Usings


using System;

using System.IO;

using System.Net;


#endregion


/// <summary>

/// The program.

/// </summary>

internal class Program

{

    #region Constants


    /// <summary>

    /// The api url.

    /// </summary>

    private const string ApiUrl = @"https://api.hippoapi.com/v3/more/json";

    /// <summary>

    /// 0 = ApiUrl

    /// 1 = API Key

    /// 2 = Email address to query

    /// </summary>

    private const string QueryFormatString = @"{0}/{1}/{2}";


    /// <summary>

    /// The your api key.

    /// </summary>

    /// <remarks>

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

    /// </remarks>

    private const string YourAPIKey = @"<!-- ENTER A VALID KEY HERE-->";


    #endregion


    #region Methods


    /// <summary>

    /// The main program entry point.

    /// </summary>

    /// <param name="args">

    /// The args.

    /// </param>

    private static void Main(string[] args)

    {

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


        var readLine = Console.ReadLine();


        Console.WriteLine(string.Empty);


        var requestUrl = string.Format(QueryFormatString, ApiUrl, YourAPIKey, readLine);


        var myRequest = (HttpWebRequest)WebRequest.Create(requestUrl);


        WebResponse webResponse = null;


        try

        {

            webResponse = myRequest.GetResponse();


            using (var reader = new StreamReader(webResponse.GetResponseStream()))

            {

                var jsonString = reader.ReadToEnd();


                Console.ForegroundColor = ConsoleColor.Green;

                Console.WriteLine("Result:");

                Console.WriteLine(jsonString);

                Console.ResetColor();

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

                Console.ReadLine();

            }

        }

        catch (Exception 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 != null)

            {

                webResponse.Dispose();

            }

        }

    }


    #endregion

}