Interface AuthOptions

Hierarchy

  • AuthOptions

Properties

accessToken?: string

AAn Access Token that can be provided in subsequent calls, for example to Spotify Web API services.

accessTokenExpiresAt?: Date

A Date object representing when the the access token expires

accessTokenExpiresIn?: number

A number of seconds until the access token expires

autoRefreshToken?: boolean

Set to "true" if you want to automatically refresh the token before expiring.

clientID?: string

Client ID used for client credentials grant

clientSecret?: string

Client Secret used for client credentials grant

fetch?: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>)

Type declaration

    • (input: RequestInfo | URL, init?: RequestInit): Promise<Response>
    • A custom fetch implementation.

      Parameters

      • input: RequestInfo | URL
      • Optional init: RequestInit

      Returns Promise<Response>

refreshExpiredAccessToken?: boolean

Set to "true" if you want the access token to be refreshed when it needs to be used but has expired

refreshToken?: string

A token that can be sent to the Spotify Accounts service in place of an authorization code. (When the access code expires, send a POST request to the Accounts service /api/token endpoint, but use this code in place of an authorization code. A new Access Token will be returned. A new refresh token might be returned too.)

scopes?: SpotifyScope[]

Spotify scopes to use for user auth

Generated using TypeDoc