# Fetch Attribute Values

Fetch underlying attribute values for a given wallet address. This is an attribute query and incurs Quad Unit charges.

## **Parameters**

<table><thead><tr><th width="260">Name</th><th width="182">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>apiAccessToken</code><mark style="color:red;"><code>*</code></mark></td><td>string</td><td>Access token<br>See <a href="create-access-token">createAccessToken</a></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>attributes</code></td><td>QuadrataAttribute[]</td><td>Attribute name array<br><em>Can be provided in sdkConfig</em></td></tr><tr><td><code>options</code></td><td>object</td><td>API and Fetch Options</td></tr></tbody></table>

### Parameter Options

<table><thead><tr><th width="300">Name</th><th width="182">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>allowUnsafeClientApiCall</code></td><td>boolean</td><td>Allow service to run in client</td></tr></tbody></table>

## SDK Configuration

<table><thead><tr><th width="269">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="create-access-token">createAccessToken</a></td></tr><tr><td><code>attributes</code></td><td>QuadrataAttribute[]</td><td>Attribute name array<br><em>Can be provided in params</em></td></tr></tbody></table>

{% hint style="info" %}
See [Query Attributes Via API](https://docs.quadrata.com/integration/how-to-integrate/query-attributes/via-api) for more information about the underlying API endpoint.
{% endhint %}

## Example

```typescript
import type { API } from '@quadrata/sdk/types';
import { fetchAttributeValues, QuadrataAttribute, QuadrataEnvironment } from '@quadrata/sdk/api';

type ResponseType = API.Services.FetchAttributeValues.Response;

const response: ResponseType = await fetchAttributeValues(
    // params
    {
        apiAccessToken: 'jwt token from createAccessToken',
        walletAddress: '0x123',
        
        // optional, if provided in config
        attributes: [QuadrataAttribute.AML, QuadrataAttribute.DID],
        
        options: {
            // not recommended
            allowUnsafeClientApiCall: true,
            
            // optional fetch options
            cache: 'no-cache'
        }
    },
    // sdk config
    {
        // optional, if provided in above params
        attributes: [QuadrataAttribute.AML, QuadrataAttribute.DID],
        
        // required
        environment: QuadrataEnvironment.PRODUCTION
    }
);

const { data: { queryResult } } = response;
```
