Overview
Theusage sub-client provides daily API usage metrics. current() returns the current UTC date’s counters; history() returns earlier daily counters.
usage.current()
Get API usage metrics for the current UTC date.Response: UsageMetrics
string
The developer organization ID.
string
The current UTC date in
YYYY-MM-DD format (e.g., '2026-03-07'). The wire field retains the name period for compatibility.number
Number of token exchange operations on this UTC date.
number
Number of authorization requests on this UTC date.
number
Number of token verifications on this UTC date.
number
Total API requests across all endpoints on this UTC date.
usage.history()
Retrieve historical usage data for the specified number of days, broken down by day.Parameters
number
required
Number of days of history to retrieve (e.g.,
7, 30, 90).Response: UsageHistory
UsageEntry[]
Array of daily usage entries, ordered newest to oldest.
UsageEntry contains:
string
The date in
YYYY-MM-DD format.number
Number of token exchange operations on this day.
number
Number of authorization requests on this day.
number
Number of token verifications on this day.
number
Total API requests on this day.