Sandbox

sandboxPublicTokenCreate

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.

Authorization

PLAID-CLIENT-ID PLAID-SECRET Plaid-Version
PLAID-CLIENT-ID<token>

In: header

PLAID-SECRET<token>

In: header

Plaid-Version<token>

In: header

Request Body

application/json

SandboxPublicTokenCreateRequest defines the request schema for /sandbox/public_token/create

client_id?string

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?string

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*string

The ID of the institution the Item will be associated with

initial_products*array<>

The products to initially pull for the Item. May be any products that the specified institution_id supports. This array may not be empty.

Items1 <= items
options?

An optional set of options to be used when configuring the Item. If specified, must not be null.

Response Body

application/json

application/json

curl -X POST "https://example.com/sandbox/public_token/create" \  -H "Content-Type: application/json" \  -d '{    "institution_id": "string",    "initial_products": [      "assets"    ]  }'
{  "public_token": "public-sandbox-b0e2c4ee-a763-4df5-bfe9-46a46bce993d",  "request_id": "Aim3b"}