Oura API Sandbox - Develop Without an Oura Account

by Pinta

2 min read

Ready to build applications with Oura Ring data but don't have an Oura account or access token? No problem! The Oura API now includes a sandbox environment, allowing you to develop and test your integrations without needing real user data. This implementation got support for accessing the sandbox routes.

Sandbox: Your Testing Playground

The Oura API sandbox is a simulated environment that provides you with sample Oura Ring data. This lets you experiment with the API, build prototypes, and thoroughly test your application's logic before going live. All this without needing an Oura user account or access token.

Getting Started with the Sandbox

To access the Oura sandbox with @pinta365/oura-api is as simple as creating a new Oura client with the useSandbox option set to true:

Installation

# For Deno
deno add @pinta365/oura-api

# For Bun
bunx jsr add @pinta365/oura-api

# For Node.js
npx jsr add @pinta365/oura-api

Usage

import { Oura } from "@pinta365/oura-api";

const sandboxClient = new Oura({ useSandbox: true }); 

That's it! You can now start making API calls using the sandboxClient object, just like you would with a regular client. Explore the JSR documentation for possible methods.

Example:

try {
  const dailyActivityData = await sandboxClient.getDailyActivityDocuments('2024-01-01', '2024-01-10');
  console.log(dailyActivityData); 
} catch (error) {
  console.error("Error fetching data:", error);
}

Important Note:

  • Limited Endpoints: Not all Oura API endpoints are supported in the sandbox. Please refer to the Oura API documentation for a list of available sandbox endpoints.

Start Building Today!

The Oura API library with its sandbox environment makes Oura Ring data integration accessible to everyone. Start experimenting, testing, and building your next great application today!

You can also try the sandbox in the browser via this simple Deno playground.

You can find the library source code on GitHub.

Let us know if you have any questions or feedback!