Appearance
Reference
Global SDK object
The hosted script exposes a global workoutkit object.
Methods
workoutkit.init(baseUrl)
Initializes the SDK with your WorkoutKit base URL.
js
workoutkit.init('https://cloud.YourCompany.fizzup.com')workoutkit.start(options)
Starts a workout session.
js
workoutkit.start({
workoutId: '4RGZ7S46',
soundpack: 'none',
getAccessToken: async function () {
return 'your-access-token'
},
onWorkoutQuit: function () {},
onWorkoutSave: function (workoutData) {},
onWorkoutEvent: function (action, payload) {},
})Options
| Field | Required | Description |
|---|---|---|
workoutId | Yes | WorkoutKit workout identifier to launch |
soundpack | No | Sound theme for the workout experience |
getAccessToken | No | Async callback returning a backend-issued access token |
onWorkoutQuit | No | Callback called when the user quits the workout |
onWorkoutSave | No | Callback called when workout data is saved |
onWorkoutEvent | No | Generic callback receiving event name and payload |
workoutkit.close()
Closes the WorkoutKit iframe.
js
workoutkit.close()Supported soundpacks
Based on the current example flow:
nonezenoriginalnewwhistle
