4. Exchange public token

  1. In the onSuccess callback, you will receive a temporary public_token.
  2. Use the exchange public token endpoint to exchange the temporary public_token for a permanent access_token and financial_connection_id for the new item.
curl --location --request POST 'https://sandbox-api.letsfuse.com/v1/financial_connections/public_token/exchange' \
--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 '{
      "public_token": "public-token-returned-from-frontend-sdk"
}'
const response = await fuseApi.exchangeFinancialConnectionsPublicToken({
    public_token: "public-token-from-frontend"
} as ExchangeFinancialConnectionsPublicTokenRequest);

const responseData = response.data as ExchangeFinancialConnectionsPublicTokenResponse;

console.log(responseData.access_token);
console.log(responseData.financial_connection_id);

View endpoint details