appAuthorization property

String get appAuthorization

Returns the configured application authorization API token.

Returns an empty string when no valid token is set.

Returns

  • String: the API token or empty string.

Also see:

Implementation

static String get appAuthorization {
  final OperationResult resultString = staticMethod(
    'SdkSettings',
    'getAppAuthorization',
    logPrivacyLevel: LogPrivacyLevel.hideArgumentValues,
  );

  return resultString['result'];
}
set appAuthorization (String token)

Sets the application authorization API token used by the SDK.

The SDK must be initialized before setting the token; otherwise a GemKitUninitializedException is thrown.

The token is typically passed at the time of SDK initialization via GemKit.initialize but can be updated later.

Parameters

  • token: API token (JWT or other scheme accepted by the SDK).

Also see:

Implementation

static set appAuthorization(String token) {
  if (isSDkInitialized) {
    staticMethod(
      'SdkSettings',
      'setAppAuthorization',
      args: token,
      logPrivacyLevel: LogPrivacyLevel.hideArgumentValues,
    );
  } else {
    throw GemKitUninitializedException();
  }
}