Modernizing the Fitbit Developer Experience.
The Fitbit Web APIs are moving to a new, scalable infrastructure. We will be deprecating the legacy Fitbit Web API in September 2026. To ensure uninterrupted data continuity for your users, you will need to migrate your applications. Detailed migration guides are live on the Google Health API developer site.
Globals API
chevron down
 

Globals API

cancelAnimationFrame()

This method cancels a previously requested animation frame callback.

cancelAnimationFrame(handle: number)

Parameters

handle: number

The identifier of the request you want to cancel.

requestAnimationFrame()

This method triggers an immediate screen update, and registers a callback to be invoked before painting this update. Note that the request expires after one frame. For continuous animations, another request should be made from within the first callback.

requestAnimationFrame(handler: (timestamp: number) => void)

Parameters

handler: (timestamp: number) => void

A function to be executed before painting. The timestamp parameter indicates the time these callbacks began executing, in milliseconds. Multiple callbacks for the same frame receive the same timestamp value.