Redirect Integration (Legacy)
This style of integration involves sending the user to the Tilia flow via a full page navigation from your domain to Tilia’s.
The diagram below illustrates the flow of information within a redirect integration.
To integrate using the redirect method
Redirect integration involves the following steps:
Step 3: Handle the flow result
The rest of this document walks you through the basics of integrating a flow using the redirect method.
Step 1: User authorization
All flows start with an OAuth2 authorization of the end-user, passing an account_id
. The response will include a payload that contains a redirect URL with a generated nonce that allows the user to interact with the Tilia UIs.
Creating the nonce requires an Access Token with the scope write_user_tokens
.
curl --location --request POST https://auth.tilia-inc.com/authorize/user \
--header 'Authorization: Bearer <Access_Token>' \
--header 'Content-Type: application/json' \
Request body
{
"account_id": "<tilia_account_id>"
}
Sample response
{
"status": "Success",
"message": [],
"codes": [],
"payload": {
"redirect": "https://web.tilia-inc.com/ui/appauth/ed8ff1e9-9256-4205-918a-b9ca23ec00ec"
}
}
The response includes a redirect URL which is used in the next step.
Step 2: Create the flow link
Next, you will create a link for the user to access the flow.
<a href=”<redirect.url>?flow=<flow.name>&returnurl=<your.return.url?your.parameters>”>Click here to start the flow</a>"
Where:
-
<redirect.url>
is the URL returned in step 1. -
<flow.name>
is the Tilia flow name. Must be one of the followingtos
,kyc
,purchase
,payout
. -
<your.return.url>
is the URL you wish the user to be directed to after completing the flow. Must be a fully qualified URL. You can optionally include any of your own query string parameters.
Step 3: Handle the flow result
Upon completing the flow, the user is redirected to <your.return.url>
, with flow-specific parameters appended.
<your.return.url?your.parameters>&<tilia.flow.parameters>
Refer to the flow-specific documentation for details on the parameters returned.