Instant Auth & Instant Match

Learn how to authenticate your users instantly

Instant Auth

Instant Auth supports more than 3,800 financial institutions with credential-based login, which translates to roughly 90% coverage of all depository accounts in the US. Instant Auth is the default Auth flow and does not require extra configuration steps if Auth is already configured in your app. For clarity and completeness, the section below explains how to configure Instant Auth.

Configure & Create a link_token

Create a link_token with the following parameters:

  • products array containing auth – For Instant Auth, the products array may contain multiple Plaid products, but it must contain auth as one of those products.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Using Express
const express = require('express');
const app = express();
app.use(express.json());
const plaid = require('plaid');
const client = new plaid.Client({
clientID: process.env.PLAID_CLIENT_ID,
secret: process.env.PLAID_SECRET,
env: plaid.environments.sandbox,
});
app.post('/create_link_token', async (request, response) => {
try {
// Get the client_user_id by searching for the current user
const user = await User.find(...);
const clientUserId = user.id;
// Create the link_token with all of your configurations
const tokenResponse = await client.createLinkToken({
user: {
client_user_id: clientUserId,
},
client_name: 'Plaid Test App',
products: ["auth"],
country_codes: ['US'],
language: 'en',
webhook: 'https://webhook.sample.com',
});
response.json(tokenResponse);
} catch (e) {
// Display error on client
return response.send({ error: e.message });
}
});
Initialize Link with a link_token

After creating a link_token for the auth product, use it to initialize Plaid Link.

When the user inputs their username and password for the financial institution, the onSuccess() callback function will return a public_token.

1
2
3
4
5
6
7
8
9
10
11
Plaid.create({
// Fetch a link_token configured for 'auth' from your app server
token: (await $.post('/create_link_token')).link_token,
onSuccess: (public_token, metadata) => {
// Send the public_token and accounts to your app server
$.post('/exchange_public_token', {
publicToken: public_token,
accounts: metadata.accounts,
});
},
});
Exchange the public_token and fetch Auth data

In your own backend server, call the /item/public_token/exchange endpoint with the Link public_token received in the onSuccess callback to obtain an access_token. Persist the returned access_token and item_id in your database in relation to the user. You will use the access_token when making requests to the /auth/get endpoint.

1
2
3
4
5
6
7
8
9
10
11
12
13
const publicToken = 'public-sandbox-b0e2c4ee-a763-4df5-bfe9-46a46bce993d';
try {
// Obtain an access_token from the Link public_token
const response = await plaidClient.exchangePublicToken(publicToken);
const accessToken = response.access_token;
// Instantly fetch Auth numbers
const response = await client.getAuth(accessToken, {});
const numbers = response.numbers;
} catch (err) {
// handle error
}

Check out the /auth/get API reference documentation to see the full Auth request and response schema.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"numbers": {
"ach": [
{
"account_id": "vzeNDwK7KQIm4yEog683uElbp9GRLEFXGK98D",
"account": "9900009606",
"routing": "011401533",
"wire_routing": "021000021"
}
],
"eft": [],
"international": [],
"bacs": []
},
"accounts": [{ Object }],
"item": { Object },
"request_id": "m8MDnv9okwxFNBV"
}

Instant Match

Instant Match is available for more than 2,500 financial institutions (US only) and is automatically provided at supported institutions as a fall-back experience when Instant Auth is not available. When using Instant Match, Plaid Link will prompt your user to enter their account number and routing number. Plaid will then verify the last four digits of the user-provided account number against the account mask retrieved from the financial institution.

If you are initializing Link with your country_codes parameter set to ['US'], no additional steps are required for you to support Instant Match -- by following the steps above for Instant Auth, your Plaid integration will support Instant Match.

Otherwise, make sure to initialize /link/token/create with country_codes: ['US']. Instant Match should then be enabled for your integration.

Not all Plaid Developer accounts are enabled for Instant Match, Automated Micro-deposits, or Same Day Micro-deposits by default. To enable these features or check your status, contact your account manager or submit a product access Support ticket.