What is the Sandbox API?
The Sandbox API is a development tool that simplifies getting started with Fishjam by providing a simple backend for testing, eliminating the need to build your own server initially.
What can the Sandbox API do?
The Sandbox API is an HTTP server that comes with Fishjam's Sandbox environment. It provides basic room creation and peer management functionality without requiring you to set up your own backend infrastructure.
Key Characteristics
- Development-purposed: Designed for initial development and testing
- No authentication: Simplified access for quick prototyping
- Sandbox-only: Only available in the Sandbox environment
The Problem Sandbox API Solves
When starting with videoconferencing or livestreaming development, you typically need:
- A Backend server to create rooms
- An Authentication system to manage users
- Token management for secure peer access
- API endpoints for your frontend to call
This creates a problem: to test your frontend, you need a backend, but during prototyping you want to focus on frontend development first. The Sandbox API mitigates this issue and allows you to start frontend development ASAP.
Relationship to Server SDKs
The Sandbox API is essentially a simplified application built using the Fishjam Server SDKs:
// What Sandbox API does internally (simplified) const
fishjamClient = newFishjamClient ({fishjamUrl ,managementToken });app .get ("/", async (req :express .Request ,res :express .Response ) => { const {roomName ,peerName ,roomType } =req .query ; // Create or get room constroom = awaitfishjamClient .createRoom ({roomType :roomType asRoomConfigRoomTypeEnum , }); // Create or get peer const {peer ,peerToken } = awaitfishjamClient .createPeer (room .id );res .json ({peerToken ,url :fishjamUrl }); });
This shows you exactly what your production backend needs to do, just with proper authentication and error handling.
See also
To understand how to use The Sandbox API for development:
To learn about building your own backend:
To understand the security model: