The deeplink URL should include the miniapp ID and the relevant URL route if needed to land the user on a specific page.

The user will first deeplink to the host app, which then parses the deeplink to obtain the miniapp ID and the path to the page.


Open the homepage of the miniapp

iOS

Boxo.shared.getExistingMiniapp(appId: "app_id")?.close()
        
let miniapp = Boxo.shared.getMiniapp(appId: "app_id")
let config = MiniappConfig()
config.saveState = false
miniapp.setConfig(config: config)
miniapp.open(viewController: self)

Android

val appId = "<app_id>" // Get miniapp appId from deeplink
Boxo.getExistingMiniapp(appId)?.close()
Boxo.getMiniapp(appId)
    .setConfig(
        MiniappConfig.Builder()
            .saveState(false)
            .build()
    )
    .open(activity)

Capacitor

const appId = "<app_id>";  // Get miniapp appId from deeplink
Boxo.closeMiniapp({ appId: appId });
Boxo.openMiniapp({ appId: appId, saveState: false });

React Native

Boxo.closeMiniapp('[miniapp_id]');
Boxo.openMiniapp('[miniapp_id]', { saveState: false });

Flutter

const appId ="[app_id]"; // Get miniapp appId from deeplink
Boxo.closeMiniapp(appId);
Boxo.openMiniapp(appId, saveState: false);

Open a specific page within the miniapp

iOS

Boxo.shared.getExistingMiniapp(appId: "app_id")?.close()
        
let miniapp = Boxo.shared.getMiniapp(appId: "app_id")

let config = MiniappConfig()
config.saveState = false
miniapp.setData(data: ["deeplink" : "/help"]) // Example: '/path?id=123'
miniapp.setConfig(config: config)
miniapp.open(viewController: self)

Android

val appId = "<app_id>" // Get miniapp appId from deeplink
Boxo.getExistingMiniapp(appId)?.close()
Boxo.getMiniapp(appId)
    .setConfig(
        MiniappConfig.Builder()
            .setData(mapOf("deeplink" to "/help"))
            .saveState(false)
            .build()
    )
    .open(activity)

Capacitor

const appId = "<app_id>";  // Get miniapp appId from deeplink
Boxo.closeMiniapp({ appId: appId });
Boxo.openMiniapp({
    appId: appId,
    data: {'deeplink': '/help'}, // Example: '/path?id=123'
    saveState: false
});

React Native

Boxo.closeMiniapp('[miniapp_id]');
Boxo.openMiniapp('[miniapp_id]',
 {
  data:{ deeplink:'/help' }, // Example: '/path?id=123'
  saveState: false
});

Flutter

const appId ="[app_id]"; // Get miniapp AppId from deeplink
Boxo.closeMiniapp(appId);
Boxo.openMiniapp(appId, data: {'deeplink': '/help'}, saveState: false);