Salta ai contenuti

Demo Keys

Questi contenuti non sono ancora disponibili nella tua lingua.

Demo keys provide predictable CAPTCHA behavior for testing, development, and automated CI/CD pipelines. They enable you to test your integration and display a warning banner to prevent accidental production usage.

Demo keys are special, hardcoded site keys that bypass normal CAPTCHA verification and return predictable results. They provide trivial challenges with predetermined outcomes.

There are two demo keys available:

Site Key: 5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy

This key provides trivial CAPTCHA challenges that automatically verify successfully. Use this for testing success flows, UI states, and happy path scenarios.

Behavior:

  • Presents a trivial PoW challenge with difficulty 1
  • Verification always succeeds
  • onCaptchaVerified callback is triggered
  • Red warning banner displays on the widget

Site Key: 5CiPPseXPECbkjWCa6MnjNokrgYjMqmKndv2rSnekmSK2DjL

This key provides trivial CAPTCHA challenges that always fail verification. Use this for testing error handling, failure flows, and UI error states.

Behavior:

  • Presents a trivial PoW challenge with difficulty 1
  • Verification always fails
  • onCaptchaFailed callback is triggered
  • Red warning banner displays on the widget
  • User can retry the challenge

Demo keys are appropriate for:

  • Local Development - Test your integration without a production site key
  • CI/CD Pipelines - Automated testing where you need predictable CAPTCHA behavior
  • Unit and Integration Tests - Test both success and failure code paths
  • Prototyping - Quick integration testing during development
  • Demo Environments - Showcase integration without real CAPTCHA challenges

Demo keys should NEVER be used in:

  • Production Environments - Demo keys are automatically disabled when NODE_ENV=production
  • Staging Environments - Use real site keys to test actual CAPTCHA behavior
  • User Acceptance Testing - Real site keys ensure accurate testing of the user experience
  • Load Testing - Demo keys don’t reflect real provider performance
<div class="procaptcha"
data-sitekey="5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy"
data-callback="onSuccess"
data-failed-callback="onFailure">
</div>
import { Procaptcha } from '@prosopo/procaptcha-react';
function MyComponent() {
return (
<Procaptcha
siteKey="5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy"
onVerified={(output) => console.log('Verified:', output)}
onFailed={() => console.log('Failed')}
/>
);
}
<template>
<Procaptcha
site-key="5DAAnrj7VHTznn2AWBemMuyBwZWs6FNFjdyVXUeYum3PTXFy"
@verified="onVerified"
@failed="onFailed"
/>
</template>
<script>
import { Procaptcha } from '@prosopo/procaptcha-vue';
export default {
components: { Procaptcha },
methods: {
onVerified(output) {
console.log('Verified:', output);
},
onFailed() {
console.log('Failed');
}
}
};
</script>