API ReferenceWidget Tokens
Mint widget JWT
Mints a short-lived JWT for widget-side event ingestion. The JWT is scoped to a single trace and session, and expires after 15 minutes. Requires a valid project API key.
Authorization
apiKey AuthorizationBearer <token>
Project API key with yav_ prefix. Obtained from the Yavio dashboard.
Used by the server SDK for event ingestion and widget token minting.
In: header
Request Body
application/json
traceId*string
sessionId*string
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://ingest.yavio.ai/v1/widget-tokens" \ -H "Content-Type: application/json" \ -d '{ "traceId": "string", "sessionId": "string" }'{
"token": "string",
"expiresAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "string",
"message": "string",
"status": 0,
"requestId": "string",
"metadata": {}
}
}{
"error": {
"code": "string",
"message": "string",
"status": 0,
"requestId": "string",
"metadata": {}
}
}{
"error": {
"code": "string",
"message": "string",
"status": 0,
"requestId": "string",
"metadata": {}
}
}