Full consent lifecycle management via the v2 connectivity API.
Requires consents or consents:readonly scope.
Use this to programmatically create, inspect, and revoke user consents without requiring a Tink Link re-flow for every operation.
Example
{:ok, consent} = Tink.Consents.create(app_client, %{
"userId" => tink_user_id,
"providerId" => "uk-ob-monzo",
"scope" => "accounts:read,transactions:read"
})
# Later — check status
{:ok, consent} = Tink.Consents.get(app_client, consent["id"])
# Revoke when no longer needed
{:ok, _} = Tink.Consents.revoke(app_client, consent["id"])
Summary
Functions
Create a new consent. Requires consents.
Get a consent by ID. Requires consents:readonly.
Get a specific authorization for a consent. Requires consents:readonly.
Get a consent template for a provider. Requires consents:readonly.
List consents with pagination. Requires consents:readonly.
List authorizations for a consent. Requires consents:readonly.
Relay an authorization callback (server-side relay flows). Requires consents.
Revoke a consent. Requires consents.
Stream all consents across pages lazily.
Functions
@spec create(Tink.Client.t(), map()) :: {:ok, map()} | {:error, Tink.Error.t()}
Create a new consent. Requires consents.
@spec get(Tink.Client.t(), String.t()) :: {:ok, map()} | {:error, Tink.Error.t()}
Get a consent by ID. Requires consents:readonly.
@spec get_authorization(Tink.Client.t(), String.t(), String.t()) :: {:ok, map()} | {:error, Tink.Error.t()}
Get a specific authorization for a consent. Requires consents:readonly.
@spec get_template(Tink.Client.t(), String.t()) :: {:ok, map()} | {:error, Tink.Error.t()}
Get a consent template for a provider. Requires consents:readonly.
@spec list( Tink.Client.t(), keyword() ) :: {:ok, map()} | {:error, Tink.Error.t()}
List consents with pagination. Requires consents:readonly.
@spec list_authorizations(Tink.Client.t(), String.t()) :: {:ok, map()} | {:error, Tink.Error.t()}
List authorizations for a consent. Requires consents:readonly.
@spec relay_authorization_callback(Tink.Client.t(), map()) :: {:ok, map()} | {:error, Tink.Error.t()}
Relay an authorization callback (server-side relay flows). Requires consents.
@spec revoke(Tink.Client.t(), String.t()) :: {:ok, map()} | {:error, Tink.Error.t()}
Revoke a consent. Requires consents.
@spec stream( Tink.Client.t(), keyword() ) :: Enumerable.t()
Stream all consents across pages lazily.