Account Security Risk API

Handles login attempts, recording both successful and failed logins.


Login API

The Login Risk API of Sensfrx is used to request a risk evaluation for login attempts. This API helps in identifying potentially malicious and questionable login activities, providing security teams with valuable insights to take appropriate actions.

Request Structure

Endpoint: /v1/login

Hostname: https://a.sensfrx.ai

Method: POST

Headers:

  • Authorization: Basic Auth encoded in Base64.

  • Content-Type: application/json

Request Body for Login Failed:

  {
    "ev": "login_failed",
    "uID": "15",
    "dID": "eyJwdGwiOiJIZWxsbywgd29ybGQhIiwiZXYiOiJtX2wiLCJldCI6IjIwMjItMDktMDZUMTA6MzA6NDUuMDUyWiIsImNzIjoiVVRGLTgiLCJzciI6IjE1MzZ4ODY0IiwidnAiOiIxNTM2eDcxNCIsImNkIjoyNCwidHoiOi01LjUsImhjIjo4LCJtdCI6WyJhcHBsaWNhdGlvbi9wZGYiLCJ0ZXh0L3BkZiJdLCJwIjpbIlBERiBWaWV3ZXIiLCJDaHJvbWUgUERGIFZpZXdlciIsIkNocm9taXVtIFBERiBWaWV3ZXIiLCJNaWNyb3NvZnQgRWRnZSBQREYgVmlld2VyIiwiV2ViS2l0IGJ1aWx0LWluIFBERiJdLCJ0byI6IjIwMjItMDktMDZUMTA6MTY6MDguMTI3WiIsInBvIjoiaHR0cHM6Ly9kZW1vLWF1dGhzYWZlLmhlcm9rdWFwcC5jb20vbG9naW4ucGhwIiwicmYiOiJodHRwczovL2RlbW8tYXV0aHNhZmUuaGVyb2t1YXBwLmNvbS9pbmRleC5waHAiLCJwcyI6NCwiYm4iOiJOZXRzY2FwZSIsImJsIjoiZW4tVVMiLCJqZSI6MCwibGUiOiJtX3MiLCJkbSI6OCwid2QiOjAsIndnbHYiOiJHb29nbGUgSW5jLiAoSW50ZWwpIiwid2dsciI6IkFOR0xFIChJbnRlbCwgSW50ZWwoUikgSXJpcyhSKSBYZSBHcmFwaGljcyBEaXJlY3QzRDExIHZzXzVfMCBwc181XzAsIEQzRDExKSIsInRlIjpmYWxzZSwibXRwIjowLCJjZSI6MSwiYXgiOiJBY3RpdmVYIE9iamVjdCBub3Qgc3VwcG9ydGVkIiwicGFsIjpbXSwicG0iOjAsIl9fYXN0ayI6ImV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpqZFNJNk1UTXlMQ0p3Y2lJNk1qUXhMQ0p6WlhOelgybGtJam9pT1RabFptVXlObVV0WVRFMU5DMDBOekk0TFdJMk1UZ3RaVFEzT0RZek1EQmhOR013SWl3aWFXRjBJam94TmpZeU5EVTRNalU1TENKbGVIQWlPakUyTmpJMU1UVTROVGw5LnpRa2J6cnNlQW5PekFmekNRcFJORUs0Z3o2QTdFN091QnR3Z3UtWWNwc0kiLCJ2c2kiOiI5NmVmZTI2ZS1hMTU0LTQ3MjgtYjYxOC1lNDc4NjMwMGE0YzAiLCJ2ZGkiOiIxM2I4MTQ3My1kOGMzLTRmNTctOWIzMC1hODVkODI3NzViYjQiLCJhc2RpIjoiNmQ2NTQwIiwiYXNiaSI6ImIyZGUyOSIsImFzc2kiOiJlZDA0Yjc5YS0yZGNjLTExZWQtYjU4OS0wMDBjMjlhNWNkOGMiLCJtX20iOjEzLCJzX3UiOjAsInNfZCI6MCwieCI6ODE2LCJ5IjozNzMsInN0IjowLCJ2IjowLCJlbCI6ImJ1dHRvbiIsImVsSUQiOiJsb2dpbi1idXR0b24iLCJjbCI6e319",
    "uex": {
      "email": "admin15@yopmail.com",
      "username": "admin15"
    },
    "h": {
      "ip": "45.252.74.134",
      "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36",
      "ho": "demo.sensfrx.ai",
      "rf": "https://demo.sensfrx.ai/login.php",
      "ac": {
        "a": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
        "ae": "gzip, deflate, br",
        "al": "en-US,en;q=0.9,hi;q=0.8,mr;q=0.7"
      },
      "url": "http://demo.sensfrx.ai/login.php"
    }
  }

POST Parameters:

  • ev (string): Event type, which should be login_failed OR login_succeeded

  • uID (string): Unique identifier for the user and this supplied from application.

  • dID (string): Device ID encoded with detailed information.

  • uex (object)

    • email (string): Email of the user, if available.

    • username (string): Username of the user.

  • h (object): Header information.

    • ip (string): IP address of the user.

    • ua (string): User agent string.

    • ho (string): Hostname of the login page.

    • rf (string): Referrer URL.

    • ac (object): Accept header details.

      • a (string): Accept types.

      • ae (string): Accept encoding.

      • al (string): Accept language.

    • url (string): URL of the login page.

Response

{
    "status": "allow",
    "severity": "low",
    "risk_score": 10,
    "shadow_mode": "0",
    "device": {
        "device_id": "NcM5iaeGTuMZVfE%2BiEnioQYXpaOQ%2FXy26UL2DKXDD3EalzBzObwEEaV7WW35MbkI8t6J3%2BsNx%2BTVPyI7v5bgcls3ZhN6kjGr4ktvOu5dmKtCyKxkG%2BfULXQPt4hdv2ktlXTWxRR0%2B3UsJ3ux5WDs98bJD1YHz432",
        "name": "Chrome on Windows 10",
        "ip": "120.111.11.1",
        "location": "Pune, MH, IN"
    },
    "message": "Login Request successfully reached."
}

Example integration code

Here are example code snippets for making a request to the Sensfrx Login API endpoint for successful login event. You can make change ev (string): Event type tologin_failed OR login_succeeded


Example Code Snippets

Python

import requests
import json

url = "https://a.sensfrx.ai/v1/login"
headers = {
    "Authorization": "Basic NDE0NzE5ODIzMzEzOTMyNzphdkxHeUF5VE5wY0hxdUg2",
    "Content-Type": "application/json"
}
data = {
    "ev": "login_succeeded",
    "uID": "15",
    "dID": "eyJwdGwiOiJIZWxsbywgd29ybGQhIiwiZXYiOiJtX2wiLCJldCI6IjIwMjItMDktMDZUMTA6MzA6NDUuMDUyWiIsImNzIjoiVVRGLTgiLCJzciI6IjE1MzZ4ODY0IiwidnAiOiIxNTM2eDcxNCIsImNkIjoyNCwidHoiOi01LjUsImhjIjo4LCJtdCI6WyJhcHBsaWNhdGlvbi9wZGYiLCJ0ZXh0L3BkZiJdLCJwI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OWIzMC1hODVkODI3NzViYjQiLCJhc2RpIjoiNmQ2NTQwIiwiYXNiaSI6ImIyZGUyOSIsImFzc2kiOiJlZDA0Yjc5YS0yZGNjLTExZWQtYjU4OS0wMDBjMjlhNWNkOGMiLCJtX20iOjEzLCJzX3UiOjAsInNfZCI6MCwieCI6ODE2LCJ5IjozNzMsInN0IjowLCJ2IjowLCJlbCI6ImJ1dHRvbiIsImVsSUQiOiJsb2dpbi1idXR0b24iLCJjbCI6e319",
    "uex": {
        "email": "admin15@yopmail.com",
        "username": "admin15"
    },
    "h": {
        "ip": "45.252.74.134",
        "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36",
        "ho": "demo.sensfrx.ai",
        "rf": "https://demo.sensfrx.ai/login.php",
        "ac": {
            "a": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
            "ae": "gzip, deflate, br",
            "al": "en-US,en;q=0.9,hi;q=0.8,mr;q=0.7"
        },
        "url": "http://demo.sensfrx.ai/login.php"
    }
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

JavaScript (Node.js)

const axios = require('axios');

const url = "https://a.sensfrx.ai/v1/login";
const headers = {
    "Authorization": "Basic NDE0NzE5ODIzMzEzOTMyNzphdkxHeUF5VE5wY0hxdUg2",
    "Content-Type": "application/json"
};
const data = {
    ev: "login_succeeded",
    uID: "15",
    dID: "eyJwdGwiOiJIZWxsbywgd29ybGQhIiwiZXYiOiJtX2wiLCJldCI6IjIwMjItMDktMDZUMTA6MzA6NDUuMDUyWiIsImNzIjoiVVRGLTgiLCJzciI6IjE1MzZ4ODY0IiwidnAiOiIxNTM2eDcxNCIsImNkIjoyNCwidHoiOi01LjUsImhjIjo4LCJtdCI6WyJhcHBsaWNhdGlvbi9wZGYiLCJ0ZXh0L3BkZiJdLCJwIjpbIlBERiBWaWV3ZXIi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QiLCJhc2RpIjoiNmQ2NTQwIiwiYXNiaSI6ImIyZGUyOSIsImFzc2kiOiJlZDA0Yjc5YS0yZGNjLTExZWQtYjU4OS0wMDBjMjlhNWNkOGMiLCJtX20iOjEzLCJzX3UiOjAsInNfZCI6MCwieCI6ODE2LCJ5IjozNzMsInN0IjowLCJ2IjowLCJlbCI6ImJ1dHRvbiIsImVsSUQiOiJsb2dpbi1idXR0b24iLCJjbCI6e319",
    uex: {
        email: "admin15@yopmail.com",
        username: "admin15"
    },
    h: {
        ip: "45.252.74.134",
        ua: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36",
        ho: "demo.sensfrx.ai",
        rf: "https://demo.sensfrx.ai/login.php",
        ac: {
            a: "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
            ae: "gzip, deflate, br",
            al: "en-US,en;q=0.9,hi;q=0.8,mr;q=0.7"
        },
        url: "http://demo.sensfrx.ai/login.php"
    }
};

axios.post(url, data, { headers })
    .then(response => console.log(response.data))
    .catch(error => console.error('Error:', error));

Java

import java.net.HttpURLConnection;
import java.net.URL;
import java.io.OutputStream;
import org.json.JSONObject;

public class ApiIntegration {
    public static void main(String[] args) {
        try {
            URL url = new URL("https://a.sensfrx.ai/v1/login");
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("POST");
            conn.setRequestProperty("Authorization", "Basic NDE0NzE5ODIzMzEzOTMyNzphdkxHeUF5VE5wY0hxdUg2");
            conn.setRequestProperty("Content-Type", "application/json");
            conn.setDoOutput(true);

            JSONObject data = new JSONObject();
            data.put("ev", "login_succeeded");
            data.put("uID", "15");
            data.put("dID", "eyJwdGwiOiJIZWxsbywgd29ybGQhIiwiZXYiOiJtX2wiLCJldCI6IjIwMjItMDktMDZUMTA6MzA6NDUuMDUyWiIsImNzIjoiVVRGLTgi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3o2QTdFN091QnR3Z3UtWWNwc0kiLCJ2c2kiOiI5NmVmZTI2ZS1hMTU0LTQ3MjgtYjYxOC1lNDc4NjMwMGE0YzAiLCJ2ZGkiOiIxM2I4MTQ3My1kOGMzLTRmNTctOWIzMC1hODVkODI3NzViYjQiLCJhc2RpIjoiNmQ2NTQwIiwiYXNiaSI6ImIyZGUyOSIsImFzc2kiOiJlZDA0Yjc5YS0yZGNjLTExZWQtYjU4OS0wMDBjMjlhNWNkOGMiLCJtX20iOjEzLCJzX3UiOjAsInNfZCI6MCwieCI6ODE2LCJ5IjozNzMsInN0IjowLCJ2IjowLCJlbCI6ImJ1dHRvbiIsImVsSUQiOiJsb2dpbi1idXR0b24iLCJjbCI6e319");

            JSONObject uex = new JSONObject();
            uex.put("email", "admin15@yopmail.com");
            uex.put("username", "admin15");

            data.put("uex", uex);

            JSONObject h = new JSONObject();
            h.put("ip", "45.252.74.134");
            h.put("ua", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36");
            h.put("ho", "demo.sensfrx.ai");
            h.put("rf", "https://demo.sensfrx.ai/login.php");

            JSONObject ac = new JSONObject();
            ac.put("a", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9");
            ac.put("ae", "gzip, deflate, br");
            ac.put("al", "en-US,en;q=0.9,hi;q=0.8,mr;q=0.7");

            h.put("ac", ac);
            h.put("url", "http://demo.sensfrx.ai/login.php");

            data.put("h", h);

            OutputStream os = conn.getOutputStream();
            os.write(data.toString().getBytes());
            os.flush();
            os.close();

            if (conn.getResponseCode() != HttpURLConnection.HTTP_OK) {
                throw new RuntimeException("Failed : HTTP error code : " + conn.getResponseCode());
            }
            conn.disconnect();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Ruby

require 'net/http'
require 'json'

url = URI("https://a.sensfrx.ai/v1/login")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Basic NDE0NzE5ODIzMzEzOTMyNzphdkxHeUF5VE5wY0hxdUg2"
request["Content-Type"] = "application/json"

data = {
    ev: "login_succeeded",
    uID: "15",
    dID: "eyJwdGwiOiJIZWxsbywgd29ybGQhIiwiZXYiOiJtX2wiLCJldCI6IjIwMjItMDktMDZUMTA6MzA6NDUuMDUyWiIsImNzIjoiVVRGLTgiLCJzciI6IjE1MzZ4ODY0IiwidnAiOiIxNTM2eDcxNCIsImNkIjoyNCwidHoiOi01LjUsImhjIjo4LCJtdCI6WyJhcHBsaWNhdGlvbi9wZGYiLCJ0ZXh0L3BkZiJdLCJwIjpbIlBERiBWaWV3ZXIiLCJDaHJvbWUgUERGIFZpZXdlciIsIkNocm9taXVtIFBERiBWaWV3ZXIiLCJNaWNyb3NvZnQgRWRnZSBQREYgVmlld2VyIiwiV2ViS2l0IGJ1aWx0LWluIFBERiJdLCJ0byI6IjIwMjItMDktMDZUMTA6MTY6MDguMTI3WiIsInBvIjoiaHR0cHM6Ly9kZW1vLWF1dGhzYWZlLmhlcm9rdWFwcC5jb20vbG9naW4ucGhwIiwicmYiOiJodHRwczovL2RlbW8tYXV0aHNhZmUuaGVyb2t1YXBwLmNvbS9pbmRleC5waHAiLCJwcyI6NCwiYm4iOiJOZXRzY2FwZSIsImJsIjoiZW4tVVMiLCJqZSI6MCwibGUiOiJtX3MiLCJkbSI6OCwid2QiOjAsIndnbHYiOiJHb29nbGUgSW5jLiAoSW50ZWwpIiwid2dsciI6IkFOR0xFIChJbnRlbCwgSW50ZWwoUikgSXJpcyhSKSBYZSBHcmFwaGljcyBEaXJlY3QzRDExIHZzXzVfMCBwc181XzAsIEQzRDExKSIsInRlIjpmYWxzZSwibXRwIjowLCJjZSI6MSwiYXgiOiJBY3RpdmVYIE9iamVjdCBub3Qgc3VwcG9ydGVkIiwicGFsIjpbXSwicG0iOjAsIl9fYXN0ayI6ImV5SmhiR2NpT2lKSVV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpqZFNJNk1UTXlMQ0p3Y2lJNk1qUXhMQ0p6WlhOelgybGtJam9pT1RabFptVXlObVV0WVRFMU5DMDBOekk0TFdJMk1UZ3RaVFEzT0RZek1EQmhOR013SWl3aWFXRjBJam94TmpZeU5EVTRNalU1TENKbGVIQWlPakUyTmpJMU1UVTROVGw5LnpRa2J6cnNlQW5PekFmekNRcFJORUs0Z3o2QTdFN091QnR3Z3UtWWNwc0kiLCJ2c2kiOiI5NmVmZTI2ZS1hMTU0LTQ3MjgtYjYxOC1lNDc4NjMwMGE0YzAiLCJ2ZGkiOiIxM2I4MTQ3My1kOGMzLTRmNTctOWIzMC1hODVkODI3NzViYjQiLCJhc2RpIjoiNmQ2NTQwIiwiYXNiaSI6ImIyZGUyOSIsImFzc2kiOiJlZDA0Yjc5YS0yZGNjLTExZWQtYjU4OS0wMDBjMjlhNWNkOGMiLCJtX20iOjEzLCJzX3UiOjAsInNfZCI6MCwieCI6ODE2LCJ5IjozNzMsInN0IjowLCJ2IjowLCJlbCI6ImJ1dHRvbiIsImVsSUQiOiJsb2dpbi1idXR0b24iLCJjbCI6e319"
}

request.body = data.to_json
response = http.request(request)
puts response.read_body

PHP

<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://a.sensfrx.ai/v1/login",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode(array(
    "ev" => "login_succeeded",
    "uID" => "15",
    "dID" => "eyJwdGwiOiJIZWxsbywgd29ybGQhIiwiZXYiOiJtX2wiLCJldCI6IjIwMjItMDktMDZUMTA6MzA6NDUuMDUyWiIsImNzIjoiVVRGLTgiLCJzciI6IjE1MzZ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z3UtWWNwc0kiLCJ2c2kiOiI5NmVmZTI2ZS1hMTU0LTQ3MjgtYjYxOC1lNDc4NjMwMGE0YzAiLCJ2ZGkiOiIxM2I4MTQ3My1kOGMzLTRmNTctOWIzMC1hODVkODI3NzViYjQiLCJhc2RpIjoiNmQ2NTQwIiwiYXNiaSI6ImIyZGUyOSIsImFzc2kiOiJlZDA0Yjc5YS0yZGNjLTExZWQtYjU4OS0wMDBjMjlhNWNkOGMiLCJtX20iOjEzLCJzX3UiOjAsInNfZCI6MCwieCI6ODE2LCJ5IjozNzMsInN0IjowLCJ2IjowLCJlbCI6ImJ1dHRvbiIsImVsSUQiOiJsb2dpbi1idXR0b24iLCJjbCI6e319"
  )),
  CURLOPT_HTTPHEADER => array(
    "Authorization: Basic NDE0NzE5ODIzMzEzOTMyNzphdkxHeUF5VE5wY0hxdUg2",
    "Content-Type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>

Next Steps for Integration

  1. Integrate Forgot Password Risk API:

    • Evaluate the risk associated with password reset attempts.

    • Helps identify and prevent unauthorized password reset attempts.

  2. Integrate Fake Registration Risk API:

    • Evaluate the risk associated with new user registrations.

    • Helps detect and block fake or bot-driven registration attempts.

  3. Continuous Monitoring and Improvements:

    • Regularly monitor the API responses and adjust your security policies accordingly.


On this page