Oauth2AccessToken

@Serializable
data class Oauth2AccessToken(    var accessToken: String,     var tokenType: String,     var expiresIn: String,     var scope: String,     var refreshToken: String,     var refreshTokenExpiredIn: String)

This class represents the OAuth2 access token used for authentication with the MTN MOMO API.

Constructors

Link copied to clipboard
constructor(accessToken: String, tokenType: String, expiresIn: String, scope: String, refreshToken: String, refreshTokenExpiredIn: String)

Properties

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

The access token string used to authenticate API requests.

Link copied to clipboard
@SerializedName(value = "expires_in")
var expiresIn: String

The duration in seconds for which the access token is valid.

Link copied to clipboard
@SerializedName(value = "refresh_token")
var refreshToken: String

The token used to obtain a new access token when the current one expires.

Link copied to clipboard
@SerializedName(value = "refresh_token_expired_in")
var refreshTokenExpiredIn: String

The duration in seconds for which the refresh token is valid.

Link copied to clipboard
@SerializedName(value = "scope")
var scope: String

The scope of access granted by the token.

Link copied to clipboard
@SerializedName(value = "token_type")
var tokenType: String

The type of the token (e.g., Bearer).