Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/oura_api/src/utilsOAuth.ts>getTokens

Typescript project to interact with v2 of the Oura Ring API
Latest
function getTokens
import { getTokens } from "https://deno.land/x/oura_api@1.0.1/src/utilsOAuth.ts";

Exchanges an authorization code for an access token and refresh token.

Parameters

clientId: string
  • Your Oura API client ID.
clientSecret: string
  • Your Oura API client secret.
code: string
  • The authorization code received from Oura.
optional
redirectUri: string
  • The redirect URI used during authorization (optional if not provided earlier).

Returns

A promise that resolves with the token response.