Initialize a Link Session

The first step for integrating Link on your website

Generate a Link token

To generate a Link_token, make a request to the /link/token/create Deck API endpoint from you backend, to not leak your API keys.

Link session configuration

Your default Link customization parameters can be configured on the Dashboard, for deciding which providers you want to make available and be displayed in a Link session for your users.

Those default parameters can also be overridden, if required, when generating a Link Token for creating a new Link session. You have the option of specifying the following parameters while generating a Link Token:

  1. Language: You can control in which language is the Link session displayed to the user.
  2. Countries: This field indicates the country(s) from which the Data Source are desired. For instance, if you are looking to connect to sources from USA and Canada, then you can provide these two as part of the countries list parameter.
  3. Source Types: This field indicates the type of Data Source that will be available for the Link Session. Deck currently supports 4 types: Electricity, Water, Fuel, Telecom. Here are the more specific services that are provided under each of these groupings:
ElectricityWaterFuelTelecom
Electric and Lighting utility providersWater, Sewer, Chilled water, Steam, Irrigation and Sanitation utility providersNatural Gas, Propane and Fuel Oil utility providersInternet, Landline Phone, Television and Telecommunications utility providers

Default Link customization

As mentioned, the configuration can also be performed through the Dashboard. Once you set the parameters on the Dashboard, they will be the default setting for all Link sessions that are initiated using your Client ID. You can however, always override this by passing in different parameters while initiating a Link Session.

Request

curl -X POST "https://sandbox.datadeck.co/api/v1/link/token/create" \
 -H "accept: application/json"\
 -H "x-deck-client-id: ***Your client id***"\
 -H "x-deck-secret: ***Your sandbox secret***" \

Response

{
  "link_token": "link-sandbox-17d2f9a7-af3d-4ee4-abf4-08dc0b1ba585"
}

📘

The Link_token is meant to be passed to the Link component embedded in your website and allows to present a Link Session to your users.