curl -X POST 'https://verification.didit.me/v3/events/sdk-token/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"vendor_data": "user-42",
"allowed_event_categories": ["auth", "session", "gameplay"],
"ttl_seconds": 900,
"max_uses": 1000,
"bind_to_origin": "https://app.example.com"
}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.monitoring_events.create_sdk_token(
vendor_data="user-42",
allowed_event_categories=["auth", "session", "gameplay"],
ttl_seconds=900,
max_uses=1000,
bind_to_origin="https://app.example.com",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.monitoringEvents.createSdkToken({
vendor_data: "user-42",
allowed_event_categories: ["auth", "session", "gameplay"],
ttl_seconds: 900,
max_uses: 1000,
bind_to_origin: "https://app.example.com",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.MonitoringEvents.CreateSDKToken(ctx, didit.MonitoringEventsCreateSDKTokenParams{
VendorData: "user-42",
AllowedEventCategories: didit.Some([]didit.MonitoringEventsCreateSDKTokenParamsAllowedEventCategories{"auth", "session", "gameplay"}),
TTLSeconds: didit.Int(900),
MaxUses: didit.Int(1000),
BindToOrigin: didit.String("https://app.example.com"),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.List;
import me.didit.Didit;
import me.didit.types.MonitoringEventsCreateSdkTokenParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.monitoringEvents().createSdkToken(MonitoringEventsCreateSdkTokenParams.builder()
.vendorData("user-42")
.allowedEventCategories(List.of(MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of("auth"), MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of("session"), MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of("gameplay")))
.ttlSeconds(900L)
.maxUses(1000L)
.bindToOrigin("https://app.example.com")
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->monitoringEvents->createSdkToken([
'vendor_data' => 'user-42',
'allowed_event_categories' => ['auth', 'session', 'gameplay'],
'ttl_seconds' => 900,
'max_uses' => 1000,
'bind_to_origin' => 'https://app.example.com',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.monitoring_events.create_sdk_token(
vendor_data: "user-42",
allowed_event_categories: ["auth", "session", "gameplay"],
ttl_seconds: 900,
max_uses: 1000,
bind_to_origin: "https://app.example.com"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.MonitoringEvents.CreateSdkTokenAsync(new MonitoringEventsCreateSdkTokenParams
{
VendorData = "user-42",
AllowedEventCategories = new MonitoringEventsCreateSdkTokenParamsAllowedEventCategories[] { "auth", "session", "gameplay" },
TtlSeconds = 900,
MaxUses = 1000,
BindToOrigin = "https://app.example.com",
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"monitoring_token": "q7ZtR2xKp9VbN4mWc8LdH1sYfJ3gT6uEaQ0oPiXzBkC",
"expires_at": "2026-10-17T09:30:02.481000Z",
"allowed_event_categories": [
"auth",
"session",
"gameplay"
],
"max_uses": 1000,
"bind_to_origin": "https://app.example.com"
}Mint Monitoring SDK Token API
Mint a short-lived device credential bound to one subject so your app can submit monitoring events without exposing your API key.
curl -X POST 'https://verification.didit.me/v3/events/sdk-token/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"vendor_data": "user-42",
"allowed_event_categories": ["auth", "session", "gameplay"],
"ttl_seconds": 900,
"max_uses": 1000,
"bind_to_origin": "https://app.example.com"
}'from didit import Didit
# Reads DIDIT_API_KEY.
client = Didit()
result = client.monitoring_events.create_sdk_token(
vendor_data="user-42",
allowed_event_categories=["auth", "session", "gameplay"],
ttl_seconds=900,
max_uses=1000,
bind_to_origin="https://app.example.com",
)
print(result)import Didit from "@didit-protocol/sdk-node";
// Reads DIDIT_API_KEY.
const didit = new Didit();
const result = await didit.monitoringEvents.createSdkToken({
vendor_data: "user-42",
allowed_event_categories: ["auth", "session", "gameplay"],
ttl_seconds: 900,
max_uses: 1000,
bind_to_origin: "https://app.example.com",
});
console.log(result);ctx := context.Background()
// Reads DIDIT_API_KEY.
client := didit.NewClient()
result, err := client.MonitoringEvents.CreateSDKToken(ctx, didit.MonitoringEventsCreateSDKTokenParams{
VendorData: "user-42",
AllowedEventCategories: didit.Some([]didit.MonitoringEventsCreateSDKTokenParamsAllowedEventCategories{"auth", "session", "gameplay"}),
TTLSeconds: didit.Int(900),
MaxUses: didit.Int(1000),
BindToOrigin: didit.String("https://app.example.com"),
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)import java.util.List;
import me.didit.Didit;
import me.didit.types.MonitoringEventsCreateSdkTokenParams;
// Reads DIDIT_API_KEY.
Didit client = new Didit();
var result = client.monitoringEvents().createSdkToken(MonitoringEventsCreateSdkTokenParams.builder()
.vendorData("user-42")
.allowedEventCategories(List.of(MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of("auth"), MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of("session"), MonitoringEventsCreateSdkTokenParams.AllowedEventCategories.of("gameplay")))
.ttlSeconds(900L)
.maxUses(1000L)
.bindToOrigin("https://app.example.com")
.build());
System.out.println(result);<?php
require 'vendor/autoload.php';
use Didit\DiditClient;
// Reads DIDIT_API_KEY.
$didit = new DiditClient();
$result = $didit->monitoringEvents->createSdkToken([
'vendor_data' => 'user-42',
'allowed_event_categories' => ['auth', 'session', 'gameplay'],
'ttl_seconds' => 900,
'max_uses' => 1000,
'bind_to_origin' => 'https://app.example.com',
]);
print_r($result->toArray());require "didit"
# Reads DIDIT_API_KEY.
didit = Didit::Client.new
result = didit.monitoring_events.create_sdk_token(
vendor_data: "user-42",
allowed_event_categories: ["auth", "session", "gameplay"],
ttl_seconds: 900,
max_uses: 1000,
bind_to_origin: "https://app.example.com"
)
puts result.to_husing System;
using System.Text.Json;
using Didit;
// Reads DIDIT_API_KEY.
using var client = new DiditClient();
var result = await client.MonitoringEvents.CreateSdkTokenAsync(new MonitoringEventsCreateSdkTokenParams
{
VendorData = "user-42",
AllowedEventCategories = new MonitoringEventsCreateSdkTokenParamsAllowedEventCategories[] { "auth", "session", "gameplay" },
TtlSeconds = 900,
MaxUses = 1000,
BindToOrigin = "https://app.example.com",
});
Console.WriteLine(JsonSerializer.Serialize(result));{
"monitoring_token": "q7ZtR2xKp9VbN4mWc8LdH1sYfJ3gT6uEaQ0oPiXzBkC",
"expires_at": "2026-10-17T09:30:02.481000Z",
"allowed_event_categories": [
"auth",
"session",
"gameplay"
],
"max_uses": 1000,
"bind_to_origin": "https://app.example.com"
}Authorizations
Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is wrong, revoked or expired; 403 means no key was sent, the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.
Body
camelCase aliases are accepted: vendorData, entityType, allowedEventCategories, ttlSeconds, maxUses, bindToOrigin.
Your id for the subject every event submitted with this credential belongs to.
1 - 255company binds a company subject; any other value (default individual) binds an individual.
32Categories the credential may submit. Omit it or send [] to allow every category.
auth, session, gameplay, bonus, affiliate, payment, dispute, security, responsible_gambling, custom Lifetime of the credential in seconds.
60 <= x <= 86400Number of events the credential may submit (a batch spends one use per event). Send null for no cap within the lifetime.
x >= 1When set, the browser Origin header of every device request must equal this value exactly; a request without Origin is refused.
255Response
The credential was minted. Hand monitoring_token to the app and treat it as a secret until expires_at.
The device credential (a 43-character URL-safe token). Send it in the X-Monitoring-Token header.
When the credential stops being accepted.
Categories the credential may submit; [] means every category.
auth, session, gameplay, bonus, affiliate, payment, dispute, security, responsible_gambling, custom Event budget of the credential; null means no cap.
Origin the credential is bound to, or null.