AccessTokenProvider (v2.0)

class AccessTokenProvider

static setDelegate(AccessTokenProviderDelegate delegate);

SDK will ask AccessTokenProviderDelegate to provide access token when required. You MUST set delegate before using SDK otherwise you'll get 401 (unauthorised) error.

protocol AccessTokenProviderDelegate

String getAccessToken();

Will be called each time when access token is required.