GET /v1/oauth2/account/{account_id}/tokens

Overview

This endpoint returns all of the information about stored tokens.

https://sandbox.konsentus.com/v1/oauth2/account/{account_id}/tokens

Request Properties

Headers

Authorization REQUIRED
string
Basic Auth Header
fi_reference_id REQUIRED
string
A string representing the FI authenticating with the system
version REQUIRED
string
A string representing version of the API you are using

Further information is available on Authentication Headers and Version Header.

Path Parameters

account_id REQUIRED
string
Account ID of the account to get the user consents for.

Response Properties

These APIs are compliant with the OAuth 2.0 spec for Token Introspection.

OAuth2.0 Token Introspection

data object
response data
token string
The access token generated by Konsentus.
active boolean
Boolean indicator of whether or not the presented token is currently active.
psp_id string
Client identifier/PSP id for the OAuth 2.0 client that requested this token.
account_id string
Client identifier/PSP id for the OAuth 2.0 client that requested this token.
scope string
Scope associated with this token can be either 'payments' or 'accounts'.
exp integer
Integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire.
iat integer
Integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was originally issued.
revoked_at integer
Integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token was revoked.
errors array<object>

        See error documentation for fields and descriptions

Responses

200

Request received and user consents returned.

{
  "data": [
    {
      "token": string,
      "active": boolean,
      "psp_id": string,
      "account_id": string,
      "scope": string,
      "exp": integer,
      "iat": integer,
      "revoked_at": integer
    }
  ]
}

401

Unable to Authorize.

{
  "errors": [{
    "id": string,
    "code": string,
    "title": string,
    "link": string
  }]
}

404

Request received malformed parameters

{
  "errors": [{
    "id": string,
    "code": string,
    "title": string,
    "link": string
  }]
}

Response Example

200 OK

Request received and user consents returned.

No Tokens

{
  "data": []
}

One Token

{
  "data": [
    {
      "iat" : 1533646368,
      "account_id" : "22222222",
      "psp_id" : "PSDGB-FCA-kt-484347",
      "active" : true,
      "token" : "9c51177d-11a1-4b10-9b39-52ae26c96728",
      "exp" : 31614407,
      "revoked_at" : null,
      "scope" : "accounts"
    }
  ]
}

Multiple Tokens

{
  "data": [
    {
      "iat" : 1533646368,
      "account_id" : "11111111",
      "psp_id" : "PSDGB-FCA-kt-484347",
      "active" : true,
      "token" : "9c51177d-11a1-4b10-9b39-52ae26c96728",
      "exp" : 31614407,
      "revoked_at" : null,
      "scope" : "accounts"
    },
    {
      "iat" : 1533646368,
      "account_id" : "11111111",
      "psp_id" : "PSDGB-FCA-kt-484347",
      "active" : true,
      "token" : "9c51177d-11a1-4b10-9b39-52ae26c96728",
      "exp" : 31614407,
      "revoked_at" : null,
      "scope" : "accounts"
    }
  ]
}
Last Updated: 8/9/2019, 3:47:34 PM