Link tokens allow your customers to connect their apps with Truto. Link tokens are used to initiate a connection flow handled by Truto and the end of this connection flow, an Integrated Account is created. This integrated account acts as a link between your Truto account and the app your customer has connected. To create a link token, you need to specify a tenant_id in the request body which acts as a lookup key for an integrated account. In most cases, you can just use your customer's primary key or unique ID as the tenant_id.
Tenant IDs do NOT need to be unique. For example, one of your customers could connect multiple apps to your Truto account. You could still use the customer's primary key as tenant_id for all the apps that they connect and look them all up using the customer's primary key.
An integrated account can be reauthorized by creating a link token for it. Instead of tenant_id, you need to specify the id of the integrated account you need to reauthorize as the integrated_account_id attribute in the request body. Do NOT specify tenant_id. You can use it similar to other link tokens, with the only difference being that the customer will automatically land on the specific integration's page in Truto's connection UI and will be asked to proceed with connecting the application. After the connection flow completes, the new credentials will be updated in the integrated account.