Overview
Create a new session by callinginit({ sessionName, ... }). This initializes the SDK (if needed) and returns a session ID.
Syntax
Parameters
Session configuration object with the following properties:
Returns
Returns a Promise that resolves to the session ID (string).Examples
Basic Session Creation
With Full Configuration
For Testing
With Mass Simulation
With Experiment
Differences from init()
| Feature | init() | 
|---|---|
| SDK Initialization | ✅ Initializes SDK | 
| Session Creation | ✅ Creates session when sessionName provided | 
| Provider Setup | ✅ Configures | 
| Multiple Sessions | ❌ One at a time | 
Error Handling
Notes
- Only one session can be active at a time
 - Previous session must be ended before creating a new one
 - The returned session ID can be stored to resume later with 
init({ sessionId }) 
See Also
- init - Initialize SDK and optionally create session
 - Continue a Session - Resume existing session
 - endSession - End current session