website logo
⌘K
Email Verification API
API Overview
Authentication
Rate Limits
Response Headers
Response Codes
Reference
Code Examples
Data Privacy API
Data Privacy API Overview
Reference
Code Examples
Webhooks
Webhooks Overview
Retries and Errors
Managing Webhooks
Verifying Webhooks
Event Triggers
JavaScript Widget
JavaScript Widget Overview
Installing the Widget
Widget Configuration Options
Docs powered by
Archbee
JavaScript Widget

Installing the Widget

4min

The mailfloss widget allows you to verify emails in real-time conveniently at the point of entry, most commonly on form inputs.

Getting started:

You’ll have to get your mailfloss widget and your public key. In order to do that, you need your mailfloss account. Once that is done, you’ll find your public key and embed code under the "Apps & Plugins" section of the mailfloss application.

How to install:

The installation is simple. Just copy and paste the code snippet below into your HTML file. The only part you need to modify is the window.mf_settings object. Here, you can customize the widget settings and input your publicKey. Be sure to include your publicKey, as the widget won't function without it.

Copy and paste this snippet into your HTML file.

JS
|
<script type="text/javascript">
let mailfloss = window.mailfloss = window.mailfloss || [];
window.mf_settings = {
            "publicKey": "<your public key>"
        };
mailfloss.push(mf_settings),
(function() {
    let first_script = document.getElementsByTagName('script')[0]; 
    let script = document.createElement('script');
    script.type = "text/javascript", script.async = !0,
    script.src = "https://cdn.mailfloss.io/v1/index.min.js",
    first_script.parentNode.insertBefore(script, first_script)
})();
</script>


Things to take into consideration:

In order for the widget to work correctly, you must have an input with at least one attribute with a value of "email" on the page where the widget is installed.

Updated 08 Jun 2023
Did this page help you?
PREVIOUS
JavaScript Widget Overview
NEXT
Widget Configuration Options
Docs powered by
Archbee
TABLE OF CONTENTS
Getting started:
How to install:
Things to take into consideration:
Docs powered by
Archbee