plaid
Create or refresh an OAuth access token
/oauth/token issues an access token and refresh token depending on the grant_type provided:
- refresh_token allows refreshing an access token using a refresh token. Only the refresh_token field is required.
- urn:ietf:params:oauth:grant-type:token-exchange allows exchanging a subject token for an OAuth token. The following subject_token_types are supported:
- urn:plaid:params:tokensdb::user-token allows exchanging a Plaid-issued user token for an OAuth token. audience must be the same as the client_id. subject_token must be a Plaid-issued user token issued from the /user/create endpoint.
- urn:plaid:params:oauth::user-token allows exchanging a refresh token for an OAuth token to another client_id. The other client_id is provided in audience. subject_token must be an OAuth refresh token issued from the /oauth/token endpoint.
Note: This endpoint supports Content-Type: application/x-www-form-urlencoded as well as JSON. The fields for the form are equivalent to the fields for JSON and conform to the OAuth 2.0 specification.
post/oauth/token
Request body
Example request
{
"scope": "user:read user:write exchange",
"resource": "https://production.plaid.com",
"audience": "68028ce48d2b0dec68747f6c",
"subject_token": "user-sandbox-b0e2c4ee-a763-4df5-bfe9-46a46bce993d"
}Response
OK
Example response
{
"token_type": "Bearer",
"expires_in": 500
}