import { OuraOAuth } from "https://deno.land/x/oura_api@1.0.1/mod.ts";
Base class for the OuraOAuth API. Class containing all the methods to access the Oura API with OAuth2 Authentication.
Methods
protected
fetchData(endpoint: string,
params?: Record<string, string>,
accessToken?: string,
Fetches data from the Oura API using an OAuth2 access token.
exchangeCodeForToken(code: string): Promise<OAuth2TokenResponse>
Exchanges an authorization code for an access token and refresh token.
generateAuthUrl(scopes: OAuthScope[], state?: string): string
Generates the authorization URL for the Oura OAuth2 flow.
refreshAccessToken(suppliedRefreshToken: string): Promise<OAuth2TokenResponse>
Refreshes an expired OAuth2 access token using a refresh token.
revokeAccessToken(accessToken: string): Promise<boolean>
Revoke an OAuth2 access token.