Skip to Content
Xeonr Developer Docs

Mint a telemetry token

POST
/xmb.api.v1.TelemetryService/MintTelemetryToken

Mints a short-lived Lantern ingest token for an app. Anonymous callers are allowed; a signed-in caller's user id, and the server they name, are baked into the token and stamped on every record.

Authorization

BearerAuth
AuthorizationBearer <token>

An access token issued by the xeonr identity provider.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

client?not unknown

Which app is asking for a token. Becomes the service attribute on every record, so a question about "the Apple TV app" has one filter to answer it.

Value in"TELEMETRY_CLIENT_UNSPECIFIED" | "TELEMETRY_CLIENT_WEB" | "TELEMETRY_CLIENT_IOS" | "TELEMETRY_CLIENT_TVOS" | "TELEMETRY_CLIENT_ANDROID"
installId?string

The app's stable installation id — the same one playback sessions carry, which is what lets a session row and a device's trace name each other. Supplied by the caller because this RPC does not require a signed-in user: the errors most worth having are the ones before anyone signs in.

Length1 <= length <= 64
serverSlug?string

Slug of the server the app is signed in to. Membership is checked and the slug is baked into the token, which is what lets that server's admins — and only them — read the records. Requires a signed-in caller. Empty mints an anonymous token whose records only the platform can read.

Lengthlength <= 64
appVersion?string

Who the install is. Baked into the token so the Devices page can name a device without the device being trusted to name itself per record.

Lengthlength <= 128
osName?string
Lengthlength <= 128
osVersion?string
Lengthlength <= 128
model?string
Lengthlength <= 128
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://xmb.gg/xmb.api.v1.TelemetryService/MintTelemetryToken" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{}'
{
  "url": "https://in.lntrn.dev",
  "token": "eyJhbGciOiJFZERTQSIsImtpZCI6InhtYi0xIn0.eyJleHAiOjE3NjExMjcwMDB9.c2lnbmF0dXJl",
  "expiresIn": "3600s"
}