Skip to main content
POST
/
api
/
service
/
data
/
consent
/
details
JavaScript
import Ivy from '@getivy/node-sdk';

const client = new Ivy({
  apiKey: 'My API Key',
});

const consent = await client.data.consent.retrieve({ sessionId: 'sessionId' });

console.log(consent.createdAt);
{
  "expiresAt": 123,
  "revokedAt": 123,
  "permissions": [
    "accounts"
  ],
  "status": "created",
  "createdAt": 123,
  "updatedAt": 123
}

Authorizations

X-Ivy-Api-Key
string
header
required

API key for authentication

Body

application/json
sessionId
string
required

The ID of the data session to which the consent belongs.

Response

200 - application/json

Returns the details of the consent

permissions
enum<string>[]
required

The permissions granted in this consent.

status
enum<string>
required

The current status of the consent.

Available options:
created,
authorised,
expired,
revoked,
failed
createdAt
number
required

The Epoch time in seconds when the consent was created.

updatedAt
number
required

The Epoch time in seconds when the consent was last updated.

expiresAt
number

The Epoch time in seconds at which the consent expires.

revokedAt
number

The Epoch time in seconds at which the consent was revoked.

I