getIntegrationInitUrl method
Future<String>
getIntegrationInitUrl({
- required Provider provider,
- IntegrationInitConfig? config,
Returns the URL string required to initiate integration with the provider.
Once this URL is obtained, the user's browser or webview should be opened with it, allowing the user to authorize the integration with the specified provider.
provider - The provider to integrate with (e.g., Fitbit, Google Fit, etc.).
config - Optional configuration for the integration initialization, such as
redirect URI, state, or provider-specific user identifier. Used only by UltraHuman integration.
Implementation
Future<String> getIntegrationInitUrl({
required Provider provider,
IntegrationInitConfig? config,
}) async {
final result = await NativeSDKBridgeV3.getIntegrationInitUrl(
connectionId: connectionId,
providerSlug: provider.toJson(),
config: config != null ? jsonEncode(config.toJson()) : null,
);
ExceptionHandler.checkException(result);
return result;
}