How To Solve Issues With Email Checker API

An email checker API allows you to validate email addresses effortlessly. So, you can reach real customers. But can it really stop spammers effectively? Your database contains a huge number of email IDs. Can the API keep your mailing list clean with authentic IDs efficiently? There are lots of other problems, including potential security threats.

Can you really solve all these issues effectively with an email checker API? In this post, you will find all the details.

What is an email checker API?

An email checker API is a tool for verifying the email addresses on your mailing list efficiently. It helps identify IDs owned by real people. So, you can get access to genuine clients and grow your business effectively. It utilizes advanced features, like typos check, SMTP check, and disposable email ID detection, to ensure the deliverability of your mailing list.

Why should I use an email checker API?

  • Effectively improve email deliverability
  • Significantly reduce bounce rate
  • Protect your sender reputation so that your emails will never end up in the junk folder
  • Save time and money by automating the validation process
  • Keep your mailing list clean with authentic and genuine email addresses

How can I solve issues with an email checker API?

Which issues can you solve with the email verification API? Let’s take a look at some practical examples.

Prevent typos on registration and sign-up forms

One of the most common uses of an email checker API is to prevent typos in sign-up forms. New users are required to enter their email addresses. By enabling the API during the registration, you can help the form spot typos instantly. The users will receive an alert about their mistakes. So, they can make necessary corrections immediately.

If you are using Mailboxlayer for detecting typos, you will get an alternative email suggestion within the API result. Here is an example:

{
  "email": "user@gnail.com",
  "did_you_mean": "user@gmail.com",
  [...]
}

Here, the given email address is user@gnail.com. As you can see, the ID has a typo, which is “gnail.” It should be “gmail.” So, Mailboxlayer suggests an alternative email address with the correct spelling through the “did_you_mean” field.

Identify disposable email addresses easily to stop spammers

Disposable email addresses are widely abused by spammers. They get temporary email IDs from different providers, like Mailinator. Spammers use the addresses for fake sign-ups and to perform fraudulent activities. By utilizing an email checker API, you can identify the disposable email address effortlessly. Let’s try verifying this email address:

support@apilayer.com

Let’s make an API request by passing the email address and the API access key:

https://apilayer.net/api/check
    ? access_key = YOUR_ACCESS_KEY
    & email = support@apilayer.com

You will get this response:

{
  "email": "support@apilayer.com",
  "did_you_mean": "",
  "user": "support",
  "domain": "apilayer.net",
  "format_valid": true,
  "mx_found": true,
  "smtp_check": true,
  "catch_all": false,
  "role": true,
  "disposable": false,
  "free": false,
  "score": 0.8
}

As you can see, the disposable field is set to false. So, the given ID is not from a disposable email address provider.

Also, you can use Mailboxlayer to check the roles of email addresses. You can find the details right here.

Validate a large number of email addresses

The email checker API allows you to perform bulk email address validation. So, you can easily verify a large number of IDs.

If you are using Mailboxlayer, you simply need to append multiple comma-separated email addresses to the API’s base URL. Here is an example:

https://apilayer.net/api/check
        ? access_key = YOUR_ACCESS_KEY
        & email = support@apilayer.com, support1@apilayer.com,
        support2@mailboxlayer.com, ...

As you can see, Mailboxlayer makes it very easy to validate many email IDs. There is no hassle. So, you can perform the bulk email address verification effortlessly.

The API marketplace by Apilayer also provides a suite of highly efficient APIs. It can help you to boost your productivity significantly. Try it now for free. 

Verify email IDs in real-time

The email checker API supports the real-time email address validation feature. It allows you to verify email IDs as they are typed into the registration form. In this way, you can prevent spammers from signing up to your website in real-time.

Mailboxlayer utilizes MX-record lookup and SMTP verification technologies to perform real-time verification. The API checks whether the domain of the given email address is configured to receive emails. If Mailboxlayer finds it in the MX records, you will receive this response:

{
  [...]
  "mx_found": true,
  [...]
}

mx_found field is set to true. So, the email address is valid. If it was invalid, mx_found would have been set to false.

Next, Mailboxlayer performs the SMTP check. If the given address is valid, you will get this response:

{
  [...]
  "smtp_check": true,
  [...]
}

If the email ID was invalid, the smtp_check field would have been set to false.

Securely validate my mailing list

An email checker API features a variety of technologies for protecting your mailing list from potential security threats. For example, Mailboxlayer comes with the industry-standard 256-bit encryption technology. It prevents hackers from intruding on your system while establishing the connection between the API. You just need to attach an “s” to the HTTP protocol. That means you will have to type https://, rather than http://. It will allow the system to utilize SSL for encrypting normal HTTP requests and responses.

Can Mailboxlayer efficiently solve my issues?

Mailboxlayer is a powerful email checker API. It can help identify typos during the registration. It can perform the validation in real-time. Also, Mailboxlayer can verify a large number of email addresses effortlessly. You will never have to worry about potential security threats, thanks to the 256-bit encryption technology. Additionally, it can identify disposable email addresses to stop the spammers. So, you can definitely rely on Mailboxlayer for solving your issues efficiently.

Mailboxlayer is a simple REST API for performing email address validation. It is powerful, secure, and very easy to use.
Try it now for free!

How to Integrate Instagram API and Feed on PHP Website

Few can argue that Instagram is one of the most powerful and engaging social media platforms across the internet right now. It has more than 700 million monthly active users (MAUs) and about 400 million active users per day (DAUs). No surprise that many merchants and companies are already using Instagram as their primary sale or promotion channel.

Taking into account that 65% of customers are engaged in online shopping and social media, integrating Instagram may actually provide you a huge boost in sales and conversions. We’d like to share two most popular Instagram website integrations: social login and feed streaming and teach you how to integrate API into a website.

Login with Instagram Using PHP

It must be acknowledged that the shorter registration form – the higher conversion rates. Users are not willing to spend hours filling in long forms. The feature we’re going to integrate will allow your users to quickly login by using only their Instagram account password.

Moreover, by making this function available you still will be able to collect all valuable user data required for targeting, email newsletters, and analytical purposes.

Information that can be obtained through Instagram API:

  • User info
  • User feeds
  • User media
  • User likes
  • User follows
  • User follower
  • User Relationship
  • Search media
  • Get media
  • Popular media
  • Media likes
  • Media comments
  • Like media
  • Delete like media
  • Get location
  • Get location media
  • Search location

Step #1 Registering your Application

  • Login on www.instagram.com;
  • Go to the developer account https://www.instagram.com/developer/ ;
  • Click on “Register Your Application” button;
  • Register new client ID;
  • In “Website URL” field use your website address or localhost if you’re using it;
  • In “Redirect URL” field type location where the response will be handled (e.g. http://yourwebsite/yourprojectfolder/callback.php );
  • Go to Manage Clients tab. From here you can acquire your Client ID and Client Secret.

Step #2 User Flow

The principle of Instagram Authentication is quite simple. User clicks on “Login with Instagram” button. The request is redirected through Authorization URL to Instagram. It`s like magic.

Here’s the structure of Authorization URL:

https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code

In response, Instagram will provide you with the code in the following format:

https://your-redirect-uri?code=CODE

Get this code from URL

Step #3 Access Token

Next, you’ll need an access token. In order to acquire it you’ll need to make an array with the following data:

  • Client ID.
  • Client Secret.
  • Redirect URL.
  • Grant Type.
  • Code from Step #2.
$url = "https://api.instagram.com/oauth/access_token";
$header = 0; // header = 0, because we do not have header
$data = array(
"client_id" => $client_id,
"client_secret" => $client_secret,
"redirect_uri" => $redirect_uri,
"grant_type" => "authorization_code",
"code" => $code
);

You can call it and pass this URL using CURL

Step #4 Getting User Information

Finally, after getting access_token you can call this URL https://api.instagram.com/v1/users/self/?access_token=$access_token) and get User Data.

Data you will acquire:

  • Full Name.
  • Website.
  • Bio.
  • Followers Count.
  • Following Count.
  • Profile Picture.

That’s it, and good luck.

Just kidding! Here is a folder with all files required for integration of Instagram Login on your website using PHP.

How to integrate Instagram feed to your website without API

Most tutorials on how to implement Instagram feed suggest to use Instagram API. And while there is nothing wrong with this method, there is an easier way without actually using this API.

The first thing we need to do is to get feed data from Instagram.

Here’s a code sample for this task:

<?php
$username = 'YourUserName';
$json = file_get_contents('https://www.instagram.com/'.$username.'/media/');
$instagram_feed_data = json_decode($json, true);
?>

For the “name” field use your username as it shown in Instagram’s address line.

The string $instagram_feed_data = json_decode($json, true); indicate the data will be contained and decoded. The data will be decoded into the array.

Basically, in your array, the data about each post will be structured into [“items”]. Each item contains information about every single post including user info, images, the caption, likes, comments, etc.

This is the information we’ll gonna use. But first, you should check if there are any items in the array. Here’s how to make this:

if (isset($instagram_feed_data['items'])) 
foreach ($instagram_feed_data['items'] as $item) }

Next, you’ll need to get an actual post link and image URL. Keep in mind that the array contains image URLs in multiple formats: thumbnail, low_resolution, and standard_resolution. You may choose one of those formats depending on your needs.

In our case, we’ll be ok with low resolution.

$link = $item['link'];
$img_url = $item['images']['low_resolution']['url'];

In addition, you can take a caption. In case of Instagram posts there isn’t always a caption, so you’ll need to check whether it exists first.

$caption = isset($item['caption']) ? $item['caption']['text'] : '';

Streaming

Now, when feed data is acquired we can stream to your webpage. Let’s start with the images by using image URLs. Since this URL is leading to an external web resource (Instagram), we’ll make the target blank. Then, list output of actual image and caption.

<a href="<?= $link; ?>" target="_blank" class="instagram-post">

<img src="<?= $img_url; ?>">
<div class="caption"><?= $caption; ?></div>

That’s it. All you need is to compose all these code strings into one script. Here’s it by the way.

if (isset($instagram_feed_data['items'])) {
    foreach ($instagram_feed_data['items'] as $item) {
        $link = $item['link'];
        $img_url = $item['images']['low_resolution']['url'];
        $caption = isset($item['caption']) ? $item['caption']['text'] : '';
        
        ?>
        <a href="<?= $link; ?>" target="_blank" class="instagram-post">
            <img src="<?= $img_url; ?>">
            <div class="caption"><?= $caption; ?></div>
        </a>
        <?php
    }
}
?>

Use this simple script that will get images, caption and links from the Instagram feed with no API. With little CSS magic, you can turn this data into such a good-looking web page.

Hope you found what you looked for.

REFERENCES