Token

@Serializable
data class Token(val accessToken: String, val tokenType: String, val scope: String, val createdAt: Instant)

Represents an OAuth token used for authenticating with the API and performing actions.

Constructors

Link copied to clipboard
constructor(accessToken: String, tokenType: String, scope: String, createdAt: Instant)

Properties

Link copied to clipboard

An OAuth access token to be used for authorization.

Link copied to clipboard
@Serializable(with = TimestampToInstantSerializer::class)
val createdAt: Instant

Time at which the token was generated.

Link copied to clipboard

The OAuth scopes granted by this token, space-separated.

Link copied to clipboard

The OAuth token type. Mastodon uses Bearer tokens.