KKAccessToken

@interface KKAccessToken : NSObject <NSCoding>

The access token object. You need a valid access token to access KKBOX’s APIs. To obtain an access token, please read about KKBOX’s log-in flow.

  • Create an access token by giving a dictionary object fetched from KKBOX’s log-in APIs.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDictionary:(nonnull NSDictionary *)inDictionary;

    Swift

    init(dictionary inDictionary: [AnyHashable : Any])

    Parameters

    inDictionary

    a given dictionary

    Return Value

    an access token

  • Undocumented

    Declaration

    Objective-C

    - (nonnull instancetype)initWithCoder:(nonnull NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;

    Swift

    init(coder aDecoder: NSCoder)
  • The access token string.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nonnull) NSString *accessToken;

    Swift

    var accessToken: String { get set }
  • How long will the access token expire since now.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSTimeInterval expiresIn;

    Swift

    var expiresIn: TimeInterval { get set }
  • Type of the access token.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *tokenType;

    Swift

    var tokenType: String? { get set }
  • Scope of the access token.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSString *scope;

    Swift

    var scope: String? { get set }