Token

@Serializable
data class Token(var accessToken: String, val tokenType: String, var expiresIn: Int, var refreshToken: String? = null, scopeString: String? = null)(source)

Represents a Spotify Token, retrieved through instantiating a SpotifyApi

Parameters

accessToken

An access token that can be provided in subsequent calls, for example to Spotify Web API services.

tokenType

How the access token may be used: always Bearer”.

expiresIn

The time period (in seconds) for which the access token is valid.

refreshToken

A token that can be sent to the Spotify Accounts service in place of an authorization code, null if the token was created using a method that does not support token refresh

Constructors

Link copied to clipboard
constructor(accessToken: String, tokenType: String, expiresIn: Int, refreshToken: String? = null, scopeString: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@SerialName(value = "access_token")
var accessToken: String
Link copied to clipboard

The time, in milliseconds, at which this Token expires

Link copied to clipboard
@SerialName(value = "expires_in")
var expiresIn: Int
Link copied to clipboard
@SerialName(value = "refresh_token")
var refreshToken: String?
Link copied to clipboard

A list of scopes granted access for this accessToken. An empty list means that the token can only be used to access public information.

Link copied to clipboard
@SerialName(value = "token_type")
val tokenType: String

Functions

Link copied to clipboard