DEVELOPER GUIDE
Integration with WhiteLabel
Integration WhiteLabel using App2App Flow
10 min
improve your mobile application's user experience with our app2app flow using the app2app flow for whitelabel integration removes the jump between the app and the browser, and users only move between your app and the institution's app, providing users with a more native app experience, thereby increasing conversion rates below we will walk you through the app2app flow and provide relevant implementation guidelines app2app flow the app2app flow is basically the same as the usually flow the main difference is that after the user completes data sharing, the whitelabel authorization result is displayed in different places in the usually flow, the user is redirected to the browser, and the whitelabel authorization result is displayed in the browser in the app2app flow, the user will be redirected to your app, and the whitelabel authorization result will be displayed in the webview of your app how your app can supports the app2app flow to use the app2app flow, you need to make the following changes to your current implementation create an application link (we call it appink ) that can open your app use this application link to generate the url address of the whitelabel after redirecting to your app through the application link, open the webview to display the whitelabel 1\ create an application link to open your app first, your app's needs to implement universal link (ios) or app links (android) if not, please follow the developer documentation below to develop allowing apps and websites to link to your content https //developer apple com/documentation/xcode/allowing apps and websites to link to your content https //developer apple com/documentation/xcode/allowing apps and websites to link to your content handling android app links https //developer android com/training/app links https //developer android com/training/app links then create an appliction link that can open your app after your users complete the data sharing authorization in the institution's app, redirect them to your app why custom url scheme is not recommended when using a custom url scheme to open your application, users will receive a pop up message that they need to confirm before being redirected to your app, which can be a poor user experience by using universal link (ios) or app link (android), users are automatically redirected to your app without needing to confirm the redirect 2\ use application link to generate whitelabel url there are currently two options basic whitelabel and advanced whitelabel basic whitelabel 1\ add app link to your basic whitelabel url's parameters(for more parameter descriptions, please refer to the basic whitelabel docid\ rscjf q1wcsjnrd413bd3 section) assuming that the url of your basic whitelabel is https //conecte sandbox klavi ai/data/v1/basic links/yourappid and applink is https //your application app com/link callback and appredirecturlkey is weburl ,the full url address of the whitelabel is as follows https //conecte sandbox klavi ai/data/v1/basic links/yourappid # your basic whitelabel url ?redirect url=https //your application app com/link result # your result url \&app link=https //your application app com/link callback # your application link \&app redirect url key=weburl url parameter values need to be encoded please use encodeuricomponent to encode the parameter values of redirect url and application link for more information about encodeuricomponent, please refer to encodeuricomponent() javascript | mdn https //developer mozilla org/en us/docs/web/javascript/reference/global objects/encodeuricomponent 2\ then open this whitelabel full url in your app's webview so that your users can perform the data sharing flow advance whitelabel call the createlink method and pass the applink parameter (see the advance whitelabel docid\ gnx p0vxnmsa9bfnoq0ob section for more details) curl location 'https //api sandbox klavi ai/data/v1/links' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "personaltaxid" "string", "businesstaxid" "string", "email" "string", "phone" "string", "redirecturl" "https //your application app com/link result", "applink" "https //your application app com/link callback" "appredirecturlkey" "weburl" \\ }' the request will return the following response, where linkurl is the url of whitelabel { "linkid" "4437b139 8a16 11ee b636 487b6bad036a", "linkurl" "https //conecte klavi ai/link?v=ahbgcioijfuzi1niis ctyjayoc1hn2zhmwfjzgrjzjkilcj0 ultqpazheq4p2xfd", "linktoken" "ahbgcioijfuzi1niis ctyjayoc1hn2zhmwfjzgrjzjkilcj0 ultqpazheq4p2xfd", "expirein" 1800 } open the linkurl in the webview so that your users can proceed with the data sharing flow 3\ display data sharing results in webview after users complete data sharing authorization in their institution's app, they will be redirected to the applink to open your application you need to read the appredirecturlkey parameter and open it in the webview to display the results of this data sharing 1\ after users complete data sharing authorization in their institution's app, they will be redirected to the application link address with the appredirecturlkey parameter, as shown below https //your application app com/link callback? # your application link \&weburl=https //conecte klavi ai/link?v=xxx 2\ by redirecting application link to redirect the user to your app, you need to read the value set by appredirecturlkey (such as weburl in the example) and open it in the webview of the application the parameter values of the weburl read in the example are as follows https //conecte klavi ai/link?v=xxx once you implement this, users will be able to seamlessly go from your app, to the organization to authorize data sharing, and then back to your app