Skip to main content
View as Markdown

Token Types - Messaging

Token Types​

Tokens are placeholders in the template subject, body, and fromName that get replaced with actual values at send time. Define tokens in msgParamsMap and reference them in the template.

Token reference syntax:

  • User tokens: {tokenName.fieldName} (e.g., {recipient.firstName})
  • All other tokens: {tokenName} (e.g., {eventLink})

4.1 Available Token Types​

TypeDescriptionValue at Send Time
UserKaltura user profile fieldsUser ID or "Message.userId" (auto-resolves from recipient)
StringStatic text replacementAny string value
MagicLinkAuto-login URL with embedded auth tokenObject: {baseURL, expiry, privileges}
DynamicType decided at send timeResolved as String or MagicLink based on the value provided
UnsubscribeUriCAN-SPAM unsubscribe linkURI string
JwtQrCodeQR code image with embedded JWTObject: {payload, secret, options?}

4.2 User Token Fields​

When using a User type token, these fields are available from the Kaltura user record:

id, partnerId, externalId, firstName, lastName, email, fullName, screenName, dateOfBirth, gender, thumbnailUrl, description, title, country, company, state, city, zip

{
"baseURL": "https://events.example.com/join",
"expiry": 24,
"privileges": "actionslimit:2"
}
FieldTypeDescription
baseURLstringBase URL for the magic link
expiryintegerLink expiry in hours
privilegesstringKS privileges for the generated session

4.4 JwtQrCode Value Structure​

{
"payload": {"eventId": "12345", "checkIn": true},
"secret": "your-jwt-secret",
"options": {"color": {"dark": "#000000"}}
}
FieldTypeRequiredDescription
payloadobjectYesJWT payload data (key-value pairs)
secretstringYesSecret for JWT signing
optionsobjectNoQR code rendering options (color settings)