curl --request POST \
--url https://{issuer}/monitoring-token/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://{issuer}/monitoring-token/"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{issuer}/monitoring-token/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{issuer}/monitoring-token/",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{issuer}/monitoring-token/"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{issuer}/monitoring-token/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{issuer}/monitoring-token/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"monitoring_token": "mt_2f8c1d9e7b6a5f4e3d2c1b0a",
"expires_at": "2026-10-17T10:56:14Z",
"allowed_event_categories": [
"session",
"gameplay",
"bonus",
"affiliate",
"payment",
"dispute",
"responsible_gambling",
"custom"
],
"max_uses": 1000,
"bind_to_origin": "https://app.example.com",
"vendor_data": "user-42"
}Créer un token de surveillance | API Didit
POST /monitoring-token/ (API Didit) échange un jeton d’accès contre un identifiant d’appareil de 15 minutes lié au vendor_data et au navigateur.
curl --request POST \
--url https://{issuer}/monitoring-token/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://{issuer}/monitoring-token/"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{issuer}/monitoring-token/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{issuer}/monitoring-token/",
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([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{issuer}/monitoring-token/"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{issuer}/monitoring-token/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{issuer}/monitoring-token/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"monitoring_token": "mt_2f8c1d9e7b6a5f4e3d2c1b0a",
"expires_at": "2026-10-17T10:56:14Z",
"allowed_event_categories": [
"session",
"gameplay",
"bonus",
"affiliate",
"payment",
"dispute",
"responsible_gambling",
"custom"
],
"max_uses": 1000,
"bind_to_origin": "https://app.example.com",
"vendor_data": "user-42"
}503 monitoring_unavailable.vendor_data de la personne, quelles que soient les informations que déclare l’appareil.Autorisations
Le token d'accès de la personne issu de POST /token/ : un JWT ES256 avec l'en-tête typ: at+jwt, valide pendant au plus 5 minutes. Il ne s'agit pas de votre clé API Didit.
Corps
Vide : le token d'accès identifie la personne.
Réponse
Un identifiant d'appareil pour la personne.
Un identifiant d'authentification d'appareil à courte durée de vie pour envoyer les événements d'activité de la personne vers la surveillance des transactions depuis son appareil. Il n'est pas lié à la session : il reste utilisable jusqu'à expires_at, même après la déconnexion.
L'identifiant d'authentification de l'appareil. Traitez-le comme un secret.
"mt_2f8c1d9e7b6a5f4e3d2c1b0a"
Au maximum 15 minutes après son émission.
"2026-10-17T10:56:14Z"
Les catégories d'événements qu'il peut envoyer. Les événements d'authentification et de sécurité proviennent toujours de Didit, jamais de l'appareil.
[
"session",
"gameplay",
"bonus",
"affiliate",
"payment",
"dispute",
"responsible_gambling",
"custom"
]
1000
L'origine de navigateur depuis laquelle l'identifiant fonctionne : l'Origin de la requête, ou null lorsqu'il n'y en avait pas.
"https://app.example.com"
La personne pour laquelle chaque événement est enregistré, indépendamment de ce que l'appareil envoie.
"user-42"