You can customize the behavior of the Co-Browsing API Flutter SDK through configuration options.
Setting Configuration
Pass options when creating the UpscopeConfiguration:
final config = UpscopeConfiguration(
apiKey: 'YOUR_API_KEY',
requireAuthorizationForSession: true,
authorizationPromptTitle: 'Screen Sharing Request',
authorizationPromptMessage: 'Allow {%agentName%|Support} to view your screen?',
endOfSessionMessage: 'Thanks for using screen sharing!',
translationsYes: 'Allow',
translationsNo: 'Decline',
);
await Upscope.instance.initialize(config);
Configuration Options
Session Authorization
| Option | Type | Default | Description |
|---|
requireAuthorizationForSession | bool | true | Require user permission before screen sharing starts. |
authorizationPromptTitle | String? | (Set through the admin interface) | Custom title for the authorization dialog. |
authorizationPromptMessage | String? | (Set through the admin interface) | Custom message for the authorization dialog. Supports placeholders. |
Message Placeholders
The authorizationPromptMessage supports these placeholders:
{%agentName%|fallback} - Agent's name with a fallback if unavailable{%currentDomain%} - App name
Example:
authorizationPromptMessage: '{%agentName%|Our support team} would like to view your screen',
UI Display
| Option | Type | Default | Description |
|---|
showBanner | bool | true | Show an in-app banner while a session is active. |
showTerminateButton | bool | true | Show a button in the banner to end the screen sharing session. |
endOfSessionMessage | String? | (Set through the admin interface) | Message displayed when the session ends. |
stopSessionText | String? | (Set through the admin interface) | Custom text for the stop session button. |
Remote Control
| Option | Type | Default | Description |
|---|
allowRemoteClick | bool? | (Set through the admin interface) | Allow agents to remotely tap on the screen. |
allowRemoteScroll | bool? | (Set through the admin interface) | Allow agents to remotely scroll the screen. |
requireControlRequest | bool? | (Set through the admin interface) | Require user approval before agents can use remote input. |
controlRequestTitle | String? | (Set through the admin interface) | Custom title for the control request prompt. |
controlRequestMessage | String? | (Set through the admin interface) | Custom message for the control request prompt. |
Lookup Code
| Option | Type | Default | Description |
|---|
enableLookupCodeOnShake | bool? | (Set through the admin interface) | Show lookup code popup when device is shaken. |
lookupCodeKeyTitle | String? | (Set through the admin interface) | Custom title for the shake detection alert. |
lookupCodeKeyMessage | String? | (Set through the admin interface) | Custom message for shake alert. Supports {%lookupCode%} placeholder. |
Localization Strings
| Option | Type | Description |
|---|
translationsYes | String? | Custom text for "Allow" button in authorization prompt. |
translationsNo | String? | Custom text for "Deny" button in authorization prompt. |
translationsOk | String? | Custom text for "OK" button. |
System Options
| Option | Type | Description |
|---|
autoConnect | bool | Automatically connect on initialization. Default: true (set through the admin interface). |
region | String? | Server region for connections. |
Full Example
final config = UpscopeConfiguration(
apiKey: 'YOUR_API_KEY',
requireAuthorizationForSession: true,
autoConnect: true,
authorizationPromptTitle: 'Screen Share',
authorizationPromptMessage: '{%agentName%|Support} wants to help you',
showBanner: true,
showTerminateButton: true,
endOfSessionMessage: 'Session ended. Thank you!',
stopSessionText: 'End Session',
allowRemoteClick: true,
allowRemoteScroll: true,
enableLookupCodeOnShake: true,
lookupCodeKeyTitle: 'Your Code',
lookupCodeKeyMessage: 'Share this code: {%lookupCode%}',
translationsYes: 'Yes, share',
translationsNo: 'No thanks',
translationsOk: 'Got it',
region: 'us-east',
);
await Upscope.instance.initialize(config);