PREREQUISITESSign up for a developer account on the Client Dashboard.
1. Install the SDK
Install the SDK at the root of your project using your preferred package manager.- npm
- yarn
2. Generate the Widget URL
There are two options to generate the widget URL:- Option A: Using a Platform API endpoint
- Option B: Using a proxy server
a. Platform API
Use the Request Widget URL endpoint to get a URL. Note that thisurl expires after ten minutes or upon first use, so you may need to request it again while following this guide.
- Request
- Response
b. Proxy Server
The SDK can make requests on your behalf to your backend service that calls the Platform API. Pass the proxy URL to a widget component via theproxy prop.
When using a proxy server, pass the widget’s configurations directly to the widget component.
Configurations List
Configurations List
Proxy
3. Import the SDK and Render the Widget
Now that you can generate a widget URL, import components from@mxenabled/react-native-widget-sdk and render them in your application.
SUCCESSYou’ve set up the SDK and embedded the Connect Widget!
Props
You can configure the state and behavior of a widget with the following component props:OAuth Redirects
To properly handle OAuth redirects from the Connect Widget back to your application when using the React Native SDK, you need to:- Update your application and enable deeplinking from native code into the React Native layer. See Linking for instructions.
- Ensure your application has a scheme. You can install and use the URI scheme package to manage your application’s schemes.
- Provide your application’s scheme to the widget component with the
uiMessageWebviewUrlSchemeprop. Expo applications that are not deployed as standalone applications should useclientRedirectUrlinstead (see note below).
Scheme
Handling Events
If you’re using the React Native SDK, you’ll listen for widget events by passing callback props in the widget component. The prop names follow the naming scheme below.
All payloads include the
user_guid (string) and session_guid (string) fields.
The following is an example integration that lets you listen to the events we send.
Troubleshooting
If widget events aren’t triggered, check the following:- Ensure your widget URL request is correctly configured for the React Native SDK:
ui_message_versionis set to4is_mobile_webviewis set totrue
- Ensure you use the corresponding widget component for the
widget_typein the widget URL request. For example, if you setwidget_typetoconnect_widget, use theConnectWidgetcomponent.

