DEVELOPER GUIDE
Integration with WhiteLabel
3 min
integration in mobile apps the mobile app needs to support the following capabilities the app needs to support deep link ( ios universal links or android app links or custom url scheme ) so that jumping to redirecturl can open your app after data sharing completed if link uses webview integration, the app needs to be developed so that the institution's authorization page in webview can launch the institution's app for data sharing authorization (for a detailed description of open finance's app to app redirection see redirecionamento app to app ) integrate with webview the default webview is unable to launch third party apps directly so app developers need to modify the webview configuration to allow users to leverage native bank apps for subsequent operations after initial authorization ios integration the ios/android native webview can handle universal links/applinks by default。 so if you do not need to support custom url scheme , then do not need to refer to the following sample code for example (void)webview (wkwebview )webview decidepolicyfornavigationaction (wknavigationaction )navigationaction decisionhandler (void (^)(wknavigationactionpolicy))decisionhandler { nsurl url = navigationaction request url; nsstring scheme = \[url scheme]; if (!\[@\[@"http", @"https"] containsobject\ scheme]) { if (\[\[uiapplication sharedapplication] canopenurl\ url]) { \[\[uiapplication sharedapplication] openurl\ url]; } decisionhandler(wknavigationactionpolicycancel); } else { decisionhandler(wknavigationactionpolicyallow); } }func webview( webview wkwebview, decidepolicyfor navigationaction wknavigationaction, decisionhandler @escaping (wknavigationactionpolicy) > void) { let url = navigationaction request url if !\["http", "https"] contains(url scheme ?? "") { if uiapplication shared canopenurl(url) { uiapplication shared open(url, options \[ ], completionhandler nil) } decisionhandler( cancel) } else { decisionhandler( allow) } } android integration the ios/android native webview can handle universal links/applinks by default。 so if you do not need to support custom url scheme , then do not need to refer to the following sample code for example @override public boolean shouldoverrideurlloading(webview view, webresourcerequest request) { string scheme = request geturl() getscheme(); if (!arrays aslist(new string\[]{"http", "https"}) contains(scheme)) { try { intent intent; if (scheme equals("intent")) { intent = intent parseuri(request geturl() tostring(), intent uri intent scheme); } else { intent = new intent(intent action view, request geturl()); } intent setflags(intent flag activity new task) startactivity(intent); } catch (activitynotfoundexception e | urisyntaxexception e) { e printstacktrace(); } return true; } return super shouldoverrideurlloading(view, request); }override fun shouldoverrideurlloading(view webview?, request webresourcerequest?) boolean { val scheme = request? url? scheme if (scheme != null && !listof("http", "https") contains(scheme)) { try { val intent = if (scheme == "intent") { intent parseuri(request url tostring(), intent uri intent scheme) } else { intent(intent action view, request url) } intent setflags(intent flag activity new task) startactivity(intent) } catch (e activitynotfoundexception) { e printstacktrace() } catch (e urisyntaxexception) { e printstacktrace() } return true } return super shouldoverrideurlloading(view, request) } flutter integration flutter integration docid\ uqzihajdokyz3k1ugmb3s react native integration react native integration docid\ pujmjkoxmhba9vum7miso integrate with system browser you can also have the app call the system browser to open the klavi link url for authorization and data sharing so that you do not need to modify the app in order to launch the institution's app in the webview you need to take care of a few things 1 you app directly launch the system browser to open klavi's link url for example objectivec(ios) nsstring urlstring = @"https //conecte sandbox klavi ai/data/v1/basic links/ofpfdemo?redirecturl=https //your web site com/your authorization result page"; nsurl url = \[nsurl urlwithstring\ urlstring]; if (\[\[uiapplication sharedapplication] canopenurl\ url]) { \[\[uiapplication sharedapplication] openurl\ url options @{} completionhandler ^(bool success) { if (success) { nslog(@"url was opened successfully "); } else { nslog(@"failed to open url "); } }]; } java(android) string urlstring = "https //conecte sandbox klavi ai/data/v1/basic links/ofpfdemo?redirecturl=https //your web site com/your authorization result page"; uri uri = uri parse(urlstring); intent intent = new intent(intent action view, uri); if (intent resolveactivity(getpackagemanager()) != null) { startactivity(intent); } if you were a klavi customer before 22/11/2024, you may be able to use the links according to the old nomenclature, then, the urlstring may be https //open sandbox klavi ai/data/v1/basic links/ofpfdemo?redirecturl=https //your web site com/your authorization result page https //open sandbox klavi ai/data/v1/basic links/ofpfdemo?redirecturl=https //your web site com/your authorization result page in the system browser, the user accesses the klavi link for the authorization data sharing flow, after the authorization sharing is completed klavi will redirect to the redirecturl page(the redirecturl in the example is https //your web site com/your authorization result page ) 2 launch your app on the redirecturl page in the system browser, displaying the authorization sharing results and guiding the user through the subsequent flow this example is based on the app's deep link is using custom url scheme if your app deep link supports ios universal links or android app links , then consult the documentation for specific technical details supporting universal links in your app or handling android app links for example( custom url scheme ) redirecturl page redirecting redirecting iframe embedding restrictions the bank authorization page prohibits access through iframes this prevents end users from logging into their bank accounts from within the whitelabel app or web pages