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"
}Crea token di monitoraggio | API di autenticazione Didit
Didit: POST /monitoring-token/ scambia un access token per una credenziale del dispositivo di 15 minuti legata a vendor_data e al browser.
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 della persona, indipendentemente da ciò che dichiara il dispositivo.Autorizzazioni
Il token di accesso della persona restituito da POST /token/: un JWT ES256 con intestazione typ: at+jwt, valido per un massimo di 5 minuti. Non la tua chiave API di Didit.
Corpo
Vuoto: il token di accesso identifica la persona.
Risposta
Una credenziale di dispositivo per la persona.
Una credenziale del dispositivo di breve durata per inviare gli eventi di attività della persona al monitoraggio delle transazioni dal suo dispositivo. Non è vincolata alla sessione: rimane utilizzabile fino a expires_at, anche dopo la disconnessione.
La credenziale del dispositivo. Trattala come un segreto.
"mt_2f8c1d9e7b6a5f4e3d2c1b0a"
Al massimo 15 minuti dopo la sua emissione.
"2026-10-17T10:56:14Z"
Le categorie di eventi che può inviare. Gli eventi di autenticazione e sicurezza provengono sempre da Didit, mai dal dispositivo.
[
"session",
"gameplay",
"bonus",
"affiliate",
"payment",
"dispute",
"responsible_gambling",
"custom"
]
1000
L'origine del browser da cui opera la credenziale: l'Origin della richiesta, oppure null quando assente.
"https://app.example.com"
La persona per cui viene registrato ogni evento, indipendentemente da ciò che invia il dispositivo.
"user-42"