Create a Session Token
POST /session/token/create
Any Plaid experience a user sees such as connecting a bank account, verifying identity, or sharing a credit report is considered a session. Today, most sessions happen through Link and the token to start these Link session is a link token created and configured via link/token/create.
Sessions are a higher level abstraction where configuration primarily happens in Plaid Dashboard.
Depending on the template id provided, the session may a Link session, specified by a Link token, or may be another experience in the future. A primary benefit is that configuration changes can be done in Dashboard with no code changes required.
Currently, this endpoint is only supported for Layer templates and Link but is reserved in the future to initialize other end-user Plaid experiences. The returned Link token is used as an parameter when initializing the Link SDK. For more details, see the Link flow overview.
Request Body
Required
SessionTokenCreateRequest defines the request schema for /session/token/create
Parameters
client_id
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
secret. The secret is required and may be provided either in the PLAID-SECRET header or as part of a request body.
template_id
user
/session/token/create. Required if the root-level user_id field isn’t included.
client_user_id
client_user_id. It is currently used as a means of searching logs for the given user in the Plaid Dashboard.
user_id
user_id of the User associated with this webhook, warning, or error.
user_id
redirect_uri
redirect_uri should not contain any query parameters. When used in Production, must be an https URI. To specify any subdomain, use * as a wildcard character, e.g. https://*.example.com/oauth.html. Note that any redirect URI must also be added to the Allowed redirect URIs list in the developer dashboard. If initializing on Android, android_package_name must be specified instead and redirect_uri should be left blank.
android_package_name
android_package_name must be left blank and redirect_uri should be used instead.
webhook
Response
SessionTokenCreateResponse defines the response schema for /session/token/create
Response Properties
request_id
link
/session/token/create intended for use with the Link SDK.
link_token
public_token.
expiration
link_token, in ISO 8601 format. A link_token created to generate a public_token that will be exchanged for a new access_token expires after 4 hours. A link_token created for an existing Item (such as when updating an existing access_token by launching Link in update mode) expires after 30 minutes.
user_id
user_id generated by Plaid for the client-provided client_user_id. This field is currently in beta.