Technical documentation
Integration guide
Add age verification to your site in minutes. Your site never receives the user’s identity: only confirmation that they are of legal age.
- Create your business account and add your site with its domain names.
- Note your public key (mp_pub_…) and your secret key (mp_sec_…). The secret key stays on your server.
- Choose a method below.
1. WordPress
Download the plugin, install it (Plugins › Add New › Upload Plugin), then paste your keys in Settings › MajeurPass. You can protect the whole site or only some content with the shortcode [majeurpass]…[/majeurpass].
2. PHP site
Download the MajeurPass.php file, place it on your server, then:
<?php
require 'MajeurPass.php';
$mp = new MajeurPass('mp_pub_…', getenv('MAJEURPASS_SECRET'));
// Page restricted to adults
if (!MajeurPass::estVerifie()) {
header('Location: ' . $mp->lienVerification('https://votre-site.fr/majeurpass-retour.php'));
exit;
}
// majeurpass-retour.php
if ($mp->traiterRetour()) {
header('Location: /');
} else {
echo 'Verification unsuccessful.';
}
3. Ready-to-use button
Display the official MajeurPass button anywhere on your site. The script sets no cookies and uses no trackers.
<div data-majeurpass
data-cle="mp_pub_…"
data-retour="https://votre-site.fr/majeurpass-retour"
data-etat="random-value-generated-by-your-server"></div>
<script src="https://majeurpass.com/widget.js" async></script>
4. Direct link and API (all languages)
Send the user to:
https://majeurpass.com/fr/acces?cle=mp_pub_…&retour=https://votre-site.fr/retour&etat=XYZ
They return to your return URL with ?mp_jeton=…&etat=XYZ. Check that “etat” matches the value you sent, then validate the token from your server:
curl -X POST https://majeurpass.com/api/v1/verifier \
-H "Authorization: Bearer mp_sec_…" \
-d "jeton=mp_tok_…"
{"valide":true,"majeur":true,"site":"mp_pub_…","verifie_le":"2026-12-06T14:00:00+00:00"}
- A token is valid for 10 minutes and can only be validated once.
- The return URL must use HTTPS and belong to your authorised domains.
- If the user cancels, they return with ?mp_erreur=annule.
- The token contains no personal data: MajeurPass keeps no link between the user and your site.
Need help?
Nemesis-Dev can handle the integration for you. Contact us.