Returns the current access token, or undefined if none is stored.
Ensure a valid access token is available, refreshing if necessary. Called automatically when a request returns 401 Unauthorized.
Persist new tokens (called after a successful token grant or refresh).
OptionalrefreshToken: string
Contract for a pluggable token provider that manages OAuth token lifecycle.
Implement this interface to integrate soundcloud-api-ts with your framework's session management, e.g. NextAuth, Clerk, Redis, or a simple in-memory store.
Example
See
docs/auth-guide.md