SMS services from iP.1

Multi-factor authentication via SMS

Multi-factor authentication (MFA) not only gives your customers' accounts a higher level of security - you also protect your own system against junk accounts and malicious bot logins.

Create an account, copy the example code and paste into your project, then you are ready to increase the security of your system!

What is Multi-Factor Authentication?

Multi-factor authentication (MFA) provides an extra layer of security to ensure that it really is the right person trying to log in.

The most common approach is to use 2FA linked to the regular login process, which is activated when a user has entered their password. The system then sends out a verification code via SMS to the user's registered mobile number, which the user then fills in to confirm their login.

Why should I use multi-factor authentication?

For example, using only usernames and passwords to secure your online accounts, which used to be the standard, is no longer an optimal security solution thanks to the increasingly frequent problem of data breaches which, among other things, are carried out to steal important information, such as credit card details, social security numbers and other sensitive data.

When you use 2FA in connection with login, it becomes much, at the same time, much more difficult for unauthorized persons to access devices and digital services than when, for example, only a password is used. Protect your systems or your customers' accounts by integrating two-factor authentication (2FA) through iP.1's smart SMS API.

Global blacklist for disposable numbers

When you integrate two-factor authentication from iP.1, you get automatic access to our global blacklist, which consists of virtual numbers, but also mobile numbers that have been used in, among other things, account registrations by bots and other forms of malicious activity. You can read more about how to determine if a number is a so-called one-time number on our Github page.

The blacklist is also excellent to use to, for example, check numbers that are entered during, for example, account registration in a registration process. Of course, you also have the option of adding numbers to the blacklist yourself to ensure that these numbers are not used in other systems. You can read more about how to add numbers to the blacklist on our Github page.

As simple as that!

Create a free developer account and then paste the code from our code samples, then you're ready to start sending 2FA!

With the help of our extensive documentation page, you can easily create a MFA flow in your own system or software in no time.

Do you need help?

No problem! Our development team is ready to guide you in your integration, just give us a call or send us a mail and we will help you!

Authenticate Validate
using (where client = new HttpClient()) { client.BaseAddress = new Uri(“https://api.ip1sms.com/api/”); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(“application/json”)); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(“Bearer”, “API Key”); where authenticate = new { Recipients = “46712345678”, From = "iP1", MessageFormat = "Use the following code to authenticate {0}" Length = “6” ExpirationTime = “1200” }; HttpResponseMessage response = await client.PostAsJsonAsync("authentication", authenticate); }
string submittedCode = Console.ReadLine(); // eg 453342 using (where client = new HttpClient()) { client.BaseAddress = new Uri(“https://api.ip1sms.com/api/”); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(“application/json”)); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(“Bearer”, “API Key”); where validate = new { Phone = “46712345678”, Code = submittedCode, }; HttpResponseMessage response = await client.PostAsJsonAsync("authentications/validate", validate); if (response.IsSuccessStatusCode) { Console.Log(“Validated”); } else { Console.Log(“Failed, ” + response.StatusCode + “: ” + await response.Content.ReadAsStringAsync()); } }
Authenticate Validate
$message = array( 'Phone' => ‘46712345678’, 'From' => ‘iP1’, 'MessageFormat' => ’AUe the following code to authenticate {0}’, 'Length' => ‘6’, 'ExpirationTime' => ‘1200’ ); $jsonEncodedMessage = json_encode($message); 1TP4Options = array( ‘http’ => array( ‘header’ => array( ‘Content-Type: application/json’, ‘Authorization: Bearer ‘ . ‘API key’, ‘Content-Length: ‘ . strlen($jsonEncodedMessage) ), ‘method’ => 'MAIL', 'content' => $jsonEncodedMessage, ) ); $context = stream_context_create(1TP4Options); $response = file_get_contents('https://api.ip1sms.com/api/authentications/validate', false, $context);
$submittedCode = $_POST[“code”]; // eg 453342 $conf = array( 'Phone' => ‘46712345678’, 'Code' => $submittedCode, ); $jsonEncodedMessage = json_encode($conf); 1TP4Options = array( ‘http’ => array( ‘header’ => array( ‘Content-Type: application/json’, ‘Authorization: Bearer ‘ . ‘API key’, ‘Content-Length: ‘ . strlen($jsonEncodedMessage) ), ‘method’ => 'MAIL', 'content' => $jsonEncodedMessage, ) ); $context = stream_context_create(1TP4Options); $response = file_get_contents('https://api.ip1sms.com/api/authentications', false, $context); echo $response;