Skip to main content

taCAPTCHA Tool

Privacy-friendly CAPTCHA that protects user privacy while preventing bot abuse.

🎯 What is taCAPTCHA?

taCAPTCHA is a privacy-first CAPTCHA solution that provides bot protection without compromising user privacy. It uses advanced behavioral analysis instead of traditional image-based challenges.

⚙️ Setup & Configuration

<!-- Include taCAPTCHA CSS and JavaScript -->
<link rel="stylesheet" href="https://captcha.trustedaccounts.org/static/trusted-accounts-captcha.css">
<script async defer src="https://captcha.trustedaccounts.org/static/trusted-accounts-captcha.js" type="module"></script>

<form method="post" action="/example-form">
<input type="text" name="example_field" placeholder="Example field...">

<!-- Add taCAPTCHA somewhere in your form -->
<ta-captcha name="captcha"></ta-captcha>

<button type="submit">Submit</button>
</form>

🔧 Server-Side Verification

Node.js/Express Example

// Node.js/Express server-side verification example
app.post('/submit', async (req, res) => {
// Get the CAPTCHA token from the form
const { captcha } = req.body;

// Verify the CAPTCHA token
const verifyData = await fetch('https://captcha-server.trustedaccounts.org/v1/verify/signature', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
payload: captcha,
}),
}).then(res => res.json());

if (verifyData.verified) {
// CAPTCHA is valid, process the form
}
});

app.listen(3000, () => {
console.log('Server running on port 3000');
});

Python/Django Example

import requests
from django.http import JsonResponse
from django.views.decorators.csrf import csrf_exempt
import json

@csrf_exempt
def submit_form(request):
if request.method == 'POST':
captcha_token = request.POST.get('captcha')

# Verify CAPTCHA token
verify_url = 'https://captcha-server.trustedaccounts.org/v1/verify/signature'
verify_data = {'payload': captcha_token}

try:
response = requests.post(verify_url, json=verify_data)
verify_result = response.json()

if verify_result.get('verified'):
# CAPTCHA is valid, process the form
return JsonResponse({
'success': True,
'message': 'Form submitted successfully'
})
else:
return JsonResponse({
'error': 'CAPTCHA verification failed'
}, status=400)

except requests.RequestException as e:
return JsonResponse({
'error': 'Verification service unavailable'
}, status=500)

return JsonResponse({'error': 'Invalid request'}, status=400)

PHP Example

<?php
if ($_POST) {
$captcha_token = $_POST['captcha'];

// Verify CAPTCHA token
$verify_url = 'https://captcha-server.trustedaccounts.org/v1/verify/signature';
$verify_data = json_encode(['payload' => $captcha_token]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $verify_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $verify_data);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($http_code === 200) {
$result = json_decode($response, true);

if ($result['verified']) {
// CAPTCHA is valid, process the form
echo json_encode(['success' => true, 'message' => 'Form submitted successfully']);
} else {
http_response_code(400);
echo json_encode(['error' => 'CAPTCHA verification failed']);
}
} else {
http_response_code(500);
echo json_encode(['error' => 'Verification service unavailable']);
}
}
?>

🎯 Use Cases

  • Form Protection: Prevent spam submissions
  • Registration Security: Block automated account creation
  • Comment Systems: Filter out bot comments
  • E-commerce: Protect checkout processes
  • API Endpoints: Secure public APIs

Ready to implement? Get your publishable key from the Developer Console and start protecting your forms!