DEVELOPER GUIDE
How to integrate Link
Advance WhiteLabel
5 min
1\ generate your credentials as a first step, please contact klavi business personnel( crie\@klavi ai mailto\ crie\@klavi ai ) to create sandbox environment api credentials for you these will give you access to klavi sandbox environment whitelabel/apis and test financial institutions until you are ready to upgrade to a paid plan with live financial institutions and real customers regardless of the environment, please ensure the security of this credentials, which means that the backend must be saved 2\ welcome your first customer follow the 2 steps below to create a test customer and share some test accounts with open finance step 1 create access token you should use the backend system to create an accesstoken command curl location 'https //api sandbox klavi ai/data/v1/auth' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{"accesskey" "string","secretkey" "string"}' expected response { "accesstoken" "jhbgcioijfuzi1niis qtyjayoc1hn2zhmwfjzgrjzjkilcj0 nltqpazheq4p2xfd", "expirein" 1800 } if you need to keep a valid accesstoken in the backend system at all times, please use the refresh endpoint to refresh or call the auth endpoint again to apply for a new accesstoken before the accesstoken reaches its expiration step 2 create a link create a link using the accesstoken generated earlier command 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" "string","productscallbackurl" "object","externalinfo" "object"}' expected response { "linkid" "4437b139 8a16 11ee b636 487b6bad036a", "linkurl" "https //conecte sandbox klavi ai/path?v=ahbgcioijfuzi1niis ctyjayoc1hn2zhmwfjzgrjzjkilcj0 ultqpazheq4p2xfd", "linktoken" "ahbgcioijfuzi1niis ctyjayoc1hn2zhmwfjzgrjzjkilcj0 ultqpazheq4p2xfd", "expirein" 1800 } 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 expected linkurl may look like this https //open sandbox klavi ai/path?v=ahbgcioijfuzi1niis ctyjayoc1hn2zhmwfjzgrjzjkilcj0 ultqpazheq4p2xfd https //open sandbox klavi ai/path?v=ahbgcioijfuzi1niis ctyjayoc1hn2zhmwfjzgrjzjkilcj0 ultqpazheq4p2xfd you should notice that using this endpoint has generated another linktoken , yes, these are two different tokens accesstoken you can assume that this is the token used by your backend system linktoken you can assume that this is the token used by the linkurl generated by this endpoint, and its lifecycle is the lifecycle of the linkid and linkurl 3\ fetch product data you can use web or webview to open the linkurl , make subsequent selection of institutions, redirect to that institution for authentication, and return to the final result web page klavi backend will send you the results through event webhook(even if it is a failed state), after the status change to authorised , you can send the specific report generation request you want based on the end user type(personal or business, their endpoints are different) command curl location 'https //api sandbox klavi ai/data/personal/institution data' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ header 'authorization bearer jhbgcioijfuzi1niis qtyjayoc1hn2zhmwfjzgrjzjkilcj0 nltqpazheq4p2xfd' \\ \ data '{"taxid" "string","institutionid" "string","linkid" "string","consentid" "array","products" "array","productscallbackurl" "object"}' expected response { "requestid" "1325412e e566 4f4e ac5b 2f4471586b89", "message" "ok" } after you submit a request to generate specific or all report(the report you want to purchase has already been limited by klavi backend), klavi randomly starts retrieving data from the institution and processing it to generate the corresponding report, which will be sent to you through the report webhook klavi also supports not having to actively call this endpoint after you go living or move to production, you can proactively send all the reports you need through the report webhook after authorization is completed, or send them to klavi's storage space you can download them at any time through the klavi console