Documentation

    Configuration Options

    You can customize the behavior of the PRODUCT React Native SDK through configuration options.

    Setting Configuration

    Pass options when calling initialize():

    import Upscope from "@upscopeio/react-native-sdk";
    
    Upscope.initialize({
      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",
    });
    

    Configuration Options

    Session Authorization

    OptionTypeDefaultDescription
    requireAuthorizationForSessionbooleantrueRequire user permission before screen sharing starts.
    authorizationPromptTitlestring(Set through the admin interface)Custom title for the authorization dialog.
    authorizationPromptMessagestring(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

    OptionTypeDefaultDescription
    showTerminateButtonboolean(Set through the admin interface)Show a button in the banner to end the screen sharing session.
    endOfSessionMessagestring(Set through the admin interface)Message displayed when the session ends.
    stopSessionTextstring(Set through the admin interface)Custom text for the stop session button.

    Remote Control

    OptionTypeDefaultDescription
    allowRemoteClickbooleantrueAllow agents to remotely tap on the screen.
    allowRemoteScrollbooleantrueAllow agents to remotely scroll the screen.
    requireControlRequestboolean(Set through the admin interface)Require user approval before agents can use remote input.
    controlRequestTitlestring(Set through the admin interface)Custom title for the control request prompt.
    controlRequestMessagestring(Set through the admin interface)Custom message for the control request prompt.

    Lookup Code

    OptionTypeDefaultDescription
    enableLookupCodeOnShakeboolean(Set through the admin interface)Show lookup code popup when device is shaken.
    lookupCodeKeyTitlestring(Set through the admin interface)Custom title for the shake detection alert.
    lookupCodeKeyMessagestring(Set through the admin interface)Custom message for shake alert. Supports {%lookupCode%} placeholder.

    Localization Strings

    OptionTypeDescription
    translationsYesstringCustom text for "Allow" button in authorization prompt.
    translationsNostringCustom text for "Deny" button in authorization prompt.
    translationsOkstringCustom text for "OK" button.

    Multi-Language Translations

    Every text option (titles, messages, and the strings above) also accepts an object keyed by language code instead of a single string. The translation matching the device language is shown, falling back to en if the device language isn't included:

    translationsYes: { en: "Yes", it: "Si" },
    translationsNo: { en: "No", it: "No" },
    

    All of these can also be configured per language through the dashboard.

    Full-Device Screen Sharing (iOS)

    OptionTypeDescription
    broadcastAppGroupIdstringiOS only — required for full-device screen sharing via the broadcast extension. The App Group identifier shared between the main app and the broadcast extension (e.g. group.com.example.myapp).
    broadcastExtensionBundleIdstringiOS only — required for full-device screen sharing via the broadcast extension. The bundle ID of the Broadcast Upload Extension target (e.g. com.example.myapp.BroadcastExtension).
    disableFullScreenWhenMaskedbooleanWhen true, full-device sharing is declined while masked content is on screen. Set false to allow it even with masked content present. Default: set through the admin interface.

    System Options

    OptionTypeDescription
    autoConnectbooleanAutomatically connect on initialization. Default: true (set through the admin interface).
    regionstringServer region for connections.

    Full Example

    Upscope.initialize({
      apiKey: "YOUR_API_KEY",
      autoConnect: true,
      requireAuthorizationForSession: true,
      authorizationPromptTitle: "Screen Share",
      authorizationPromptMessage: "{%agentName%|Support} wants to help you",
      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",
    });