Create a test Item
POST /sandbox/public_token/create
Use the /sandbox/public_token/create endpoint to create a valid public_token for an arbitrary institution ID, initial products, and test credentials. The created public_token maps to a new Sandbox Item. You can then call /item/public_token/exchange to exchange the public_token for an access_token and perform all API actions. /sandbox/public_token/create can also be used with the user_custom test username to generate a test account with custom data, or with Plaid's pre-populated Sandbox test accounts.
Request Body
Required
SandboxPublicTokenCreateRequest defines the request schema for /sandbox/public_token/create
Parameters
client_id
Your Plaid API
client_id. The client_id is required and may be provided either in the PLAID-CLIENT-ID header or as part of a request body.
secret
Your Plaid API
secret. The secret is required and may be provided either in the PLAID-SECRET header or as part of a request body.
institution_id
The ID of the institution the Item will be associated with
initial_products
The products to initially pull for the Item. May be any products that the specified
institution_id supports. This array may not be empty.
options
An optional set of options to be used when configuring the Item. If specified, must not be
null.
webhook
Specify a webhook to associate with the new Item.
override_username
Test username to use for the creation of the Sandbox Item. Default value is
user_good.
override_password
Test password to use for the creation of the Sandbox Item. Default value is
pass_good.
transactions
An optional set of parameters corresponding to transactions options.
start_date
The earliest date for which to fetch transaction history. Dates should be formatted as YYYY-MM-DD.
end_date
The most recent date for which to fetch transaction history. Dates should be formatted as YYYY-MM-DD.
days_requested
The maximum number of days of transaction history to request for the Transactions product.
statements
An optional set of parameters corresponding to statements options.
start_date
The earliest date for which to fetch statements history. Dates should be formatted as YYYY-MM-DD.
end_date
The most recent date for which to fetch statements history. Dates should be formatted as YYYY-MM-DD.
income_verification
A set of parameters for income verification options. This field is required if
income_verification is included in the initial_products array.
income_source_types
The types of source income data that users will be permitted to share. Options include
bank and payroll. Currently you can only specify one of these options.
bank_income
Specifies options for Bank Income. This field is required if
income_verification is included in the initial_products array and bank is specified in income_source_types.
days_requested
The number of days of data to request for the Bank Income product
user_token
The user token associated with the User data is being requested for.
Response
SandboxPublicTokenCreateResponse defines the response schema for /sandbox/public_token/create
Response Properties
public_token
A public token that can be exchanged for an access token using
/item/public_token/exchange
request_id
A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.