Auth & Headers - Avatar Videos
Auth & Headers
All server-side API endpoints require a valid Kaltura Session (KS). A user-level KS (type=0) is sufficient — no admin privileges are required. The service authenticates the KS and extracts the partnerId and userId to scope all data: each user only sees and manages their own videos and avatars.
# Generate a KS (type=0 user session is sufficient)
KS=$(curl -s -X POST "$KALTURA_SERVICE_URL/service/session/action/start" \
-d "format=1" \
-d "secret=$KALTURA_ADMIN_SECRET" \
-d "partnerId=$KALTURA_PARTNER_ID" \
-d "type=0" \
-d "userId=creator@example.com" \
-d "expiry=86400" | tr -d '"')
# All API calls use Bearer auth with JSON body
AVATAR_API="https://video-avatar.nvp1.ovp.kaltura.com/api/v1"
Every request uses:
- Method: POST
- Header:
Authorization: Bearer $KS - Header:
Content-Type: application/json - Body: JSON
KS requirements:
- A plain KS works — standard privileges are sufficient (no
disableentitlementor custom privileges required) - Both
type=0(USER) andtype=2(ADMIN) sessions work - Data isolation is per-user: each user sees only their own videos and avatars, regardless of session type
- The partner account must have the VOD Avatar feature enabled. Use
partner/checkConfigurationto verify:The response lists prerequisite checks withcurl -s -X POST "$AVATAR_API/partner/checkConfiguration" \-H "Authorization: Bearer $KS" \-H "Content-Type: application/json" \-d '{}'valid: true/false. Thesource-only-conversion-profilecheck must be valid. Contact your Kaltura account manager if checks fail - If the KS contains a
urirestrictprivilege, the restricted URI pattern must match the API path