Create Privacy Access Token

Quadrata SDK API Service: Create Privacy Access Token

Create a Privacy Access Token to access PII data for an individual or business. This feature must be enabled for your dApp.

This service is optional and not required for you to use, as it is used internally by the SDK when needed.

Parameters

NameTypeDescription

apiKey*

string

Your API Key

walletAddress*

hex string

Wallet address

privateKeyDerBase64

string

Base64 DER String

privateKeyDer

string

DER Binary String

privateKeyPem

string

PEM String

privateKey

CryptoKey

CryptoKey object

options

object

Fetch Options

One private key parameter is required. You can provide your private key in any of the formats listed.

See API Service Options for more information

SDK Configuration

NameTypeDescription

environment*

QuadrataEnvironment

Access token See createAccessToken

See API Privacy Access Token for more information about the underlying API endpoint.

Example

import type { API } from '@quadrata/sdk/types';
import { createPrivacyAccessToken, QuadrataEnvironment } from '@quadrata/sdk/api';

type ResponseType = API.Services.CreatePrivacyAccessToken.Response;

const response: ResponseType = await createPrivacyAccessToken(
    // params
    {
        apiKey: process.env.QUADRATA_API_KEY,
        privateKeyDerBase64: process.env.QUADRATA_PRIVATE_KEY_DER_BASE64,
        walletAddress: '0x123',
        options: {
            // optional fetch options
            cache: 'no-cache'
        }
    },
    // sdk config
    { environment: QuadrataEnvironment.PRODUCTION }
);

const { data: { authToken, accessToken } } = response;

Last updated