> For the complete documentation index, see [llms.txt](https://docs.quadrata.com/integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quadrata.com/integration/how-to-integrate/quadrata-sdk/advanced/api-libraries/api-service-libraries/create-privacy-access-token.md).

# 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.

{% hint style="info" %}
This service is optional and not required for you to use, as it is used internally by the SDK when needed.
{% endhint %}

## **Parameters**

<table><thead><tr><th width="306">Name</th><th width="136">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>apiKey</code><mark style="color:red;"><code>*</code></mark></td><td>string</td><td>Your API Key</td></tr><tr><td><code>walletAddress</code><mark style="color:red;"><code>*</code></mark></td><td>hex string</td><td>Wallet address</td></tr><tr><td><code>privateKeyDerBase64</code></td><td>string</td><td>Base64 DER String</td></tr><tr><td><code>privateKeyDer</code></td><td>string</td><td>DER Binary String</td></tr><tr><td><code>privateKeyPem</code></td><td>string</td><td>PEM String</td></tr><tr><td><code>privateKey</code></td><td>CryptoKey</td><td>CryptoKey object</td></tr><tr><td><code>options</code></td><td>object</td><td>Fetch Options</td></tr></tbody></table>

{% hint style="info" %}
One private key parameter is required. You can provide your private key in any of the formats listed.

See [API Service Options](/integration/how-to-integrate/quadrata-sdk/advanced/api-libraries/api-service-options.md) for more information
{% endhint %}

## SDK Configuration

<table><thead><tr><th width="257">Name</th><th width="211">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>environment</code><mark style="color:red;"><code>*</code></mark></td><td>QuadrataEnvironment</td><td>Access token<br>See <a href="/pages/9dpQxq4Rgn4SBf9Ebnp1">createAccessToken</a></td></tr></tbody></table>

{% hint style="info" %}
See [API Privacy Access Token](/integration/how-to-integrate/request-privacy-data/api-requests/api-privacy-access-token.md) for more information about the underlying API endpoint.
{% endhint %}

## Example

```typescript
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;
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.quadrata.com/integration/how-to-integrate/quadrata-sdk/advanced/api-libraries/api-service-libraries/create-privacy-access-token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
