Userbubble
SdksReact native

Installation

Install the Userbubble React Native SDK

Choose Your Platform

Expo Projects

For Expo projects, install the SDK along with its peer dependencies:

npx expo install @userbubble/react-native expo-secure-store react-native-webview

The SDK will automatically detect Expo and use expo-secure-store for secure data storage.

Bare React Native Projects

For bare React Native projects, install the SDK with AsyncStorage and WebView:

npm install @userbubble/react-native @react-native-async-storage/async-storage react-native-webview

Or with yarn:

yarn add @userbubble/react-native @react-native-async-storage/async-storage react-native-webview

The SDK will automatically detect bare React Native and use AsyncStorage.

react-native-webview is required for embedding the feedback portal directly in your app. If you only plan to use openUserbubble() (opens in the device browser), you can skip it.

Get Your API Key

Before using the SDK, you'll need an API key:

  1. Go to your organization settings in Userbubble
  2. Navigate to "API Keys"
  3. Click "Generate New Key"
  4. Copy the API key (it starts with ub_live_ or ub_test_)

Store your API key securely in environment variables. Never commit it to your repository.

Environment Variables

For Expo:

Add to your .env file:

EXPO_PUBLIC_USERBUBBLE_API_KEY=ub_live_xxxxxxxxxxxxx
# Optional: override the default base URL (https://app.userbubble.com)
# EXPO_PUBLIC_USERBUBBLE_BASE_URL=https://your-custom-domain.com

For bare React Native:

Add to your .env file and use a package like react-native-dotenv:

USERBUBBLE_API_KEY=ub_live_xxxxxxxxxxxxx
# Optional: override the default base URL
# USERBUBBLE_BASE_URL=https://your-custom-domain.com

Next Steps

Now that you've installed the SDK, continue to the Quick Start guide to integrate it into your app.

On this page