Best Practices - Getting Started
Best Practices
- Use AppTokens in production. The
session.startexamples in this guide are for getting started. In production, use AppTokens to avoid exposing your admin secret. - Always include
format=1. Without it, API v3 returns XML instead of JSON. - Set
$KALTURA_SERVICE_URLto your region. All examples use this variable. Set it to your account's regional endpoint (see Endpoints & Regions). - Check multirequest sub-results individually. Each element in the response array can be a success or a
KalturaAPIException— check each one. - Use short-lived KS tokens. Default to 1-4 hour expiry. Renew via AppToken flow rather than generating long-lived admin sessions.
Related Guides
- Session Guide — Deep dive into KS types, creation methods, privileges, and security
- AppTokens — Production authentication without exposing secrets
- Upload & Ingestion — Upload content, manage flavors and attachments
- Player Embed — Embed the video player in web applications