Linkless with webhooks
Integration Steps
1. Request a Link Token
Call the /link/token/create endpoint to generate a link token. Don't forget to use a valid webhook_url
parameter in your payload.
Request Example:
{
"webhook_url": "https://your-webhook-url.com/events"
}
Response:
Link_token: Use this for subsequent API calls.
2. Initiate Connection
Call the /link/connect endpoint to initiate the connection. For the source_id
you can use any id corresponding to the provider that you want to connect to. Those are the same ids available in the Link widget when searching for a provider.
Request Example:
{
"link_token": "<link_token>",
"source_id": "",
"username": "xyz",
"password": "12345"
}
Response:
Public_token: Exchange this for the Access_token
3. Exchange Public Token for Access Token
After successfully calling /link/connect
, exchange the Public_token for an Access_token by calling the /connection/public_token/exchange endpoint.
Request Example:
{
"public_token": "<public_token>"
}
Response:
Access_token for accessing data once the connection is established
4. Wait for the DefaultUpdate webhook
Receiving this webhook event confirms the account is connected and data is ready. Ex.:
{
"webhook_type": "Sustainability",
"webhook_code": "DefaultUpdate",
"connection_id": "a8e32986-7023-400b-1ea6-08dcda78a78a",
"environment": "Production"
}
5. Fetch Sustainability Data
Receiving the DefaultUpdate
webhook means that data is ready to be fetched. At that point, call the /sustainability/get endpoint using the Access_token.
Example Request:
{
"access_token": "<access_token>"
}
Response:
Sustainability data for the connected account.
Updated about 1 month ago