// 1. browser — collect a session token, no cookies
<script src="https://maskbreak.com/assets/sentinel.js"></script>
// 2. server — forward it with your API key
const r = await fetch('https://maskbreak.com/v1/evaluate', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.SENTINEL_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ token: req.body.monocle })
});
// 3. act on the verdict
const v = await r.json();
if (v.isSuspicious) return res.status(403).end();
# pip install sentinelsup
from sentinel import Sentinel
client = Sentinel(api_key=os.environ["SENTINEL_KEY"])
result = client.evaluate(token=request.json["monocle"])
if result.is_suspicious:
return jsonify(error="blocked"), 403
# result.decision -> "allow" | "review" | "block"
# result.network.vpn, result.device.tampering, ...
// composer require sentinelsup/sdk
use Sentinel\Client;
$client = new Client(getenv('SENTINEL_KEY'));
$result = $client->evaluate([
'token' => $_POST['monocle'] ?? null,
]);
if ($result->isSuspicious()) {
http_response_code(403);
exit;
}
# the free endpoint needs no key at all
curl -s https://maskbreak.com/api/lookup \
-H 'Content-Type: application/json' \
-d '{"ip":"185.220.101.33"}'
# full pipeline, with a key
curl -s https://maskbreak.com/v1/evaluate \
-H "Authorization: Bearer $SENTINEL_KEY" \
-H 'Content-Type: application/json' \
-d '{"monocle":"<token from the browser>"}'