3. Create a link token

You will need to create a link token that is needed by the frontend sdk to start the process of a user connecting to a specific financial institution

  1. Use the client_secret to open the institution selection screen. When a user selects an institution, the onInstitutionSelected function is triggered. This function provides an institution_id and a callback that receives a link token.
  2. Pass the institution_id to your backend and use the create link token endpoint to create a link token.
curl --location --request POST 'https://sandbox-api.letsfuse.com/v1/link/token' \
--header 'fuse-api-key: my-fuse-api-key' \
--header 'fuse-client-id: my-fuse-client-id' \
--header 'plaid-client-id: my-plaid-client-id' \
--header 'plaid-secret: my-plaid-secret' \
--header 'teller-application-id: my-teller-application-id' \
--header 'teller-certificate: my-teller-certificate' \
--header 'teller-signing-secret: my-teller-signing-secret' \
--header 'teller-private-key: my-teller-private-key' \
--header 'mx-api-key: my-mx-api-key' \
--header 'mx-client-id: my-mx-client-id' \
--header 'Content-Type: application/json' \
--data-raw '{
	"institution_id": "institution-id-returned-from-frontend-sdk",
	"entity": {
  	"id": "12345"
  },
	"session_client_secret": "fuse_sess_dev_6c41a005-becc-467a-9546-7142747c2aac",
	"client_name": "my-client-name"
}'
  const response = await fuseApi.createLinkToken({
    institution_id: "fuse-institution-id-from-frontend",
    session_client_secret: "session-client-secret",
    entity: {
      id: "12345"
    },
    client_name: "my-company-name"
  } as CreateLinkTokenRequest);

  const linkTokenData = response.data as CreateLinkTokenResponse;

  console.log(linkTokenData.link_token);

View endpoint details