# Taiki Client SDK

### What is the Taiki Client SDK?

The Taiki Client SDK is a frontend library that simplifies the integration of Taiki's tax data retrieval service into web applications. We handle the entire user flow from log-in to data fetching for you!

**Purpose**

* **Streamlined API Integration:** The Taiki Client SDK provides a secure and user-friendly interface for authenticating users and retrieving tax documents directly from their accounts through the Taiki API.&#x20;
* **Security Focus:** This modal is designed to prioritize security, handling sensitive communication with Taiki servers to protect user credentials and data.

### How to use the Taiki Modal:

Paste this script in your html file.

```html
<script src="https://www.taiki.ai/link/link-initialize.js"></script>
```

Then in the JS section you can use the Taiki modal like so

```javascript
const taikiModal = window.Taiki.create({
    token: TEMPORARY_TOKEN,
    metadata: {YOUR_METADATA},
    onSuccess: {YOUR_FUNCTION}
})
```

<table><thead><tr><th>Key</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td><pre><code>token
</code></pre></td><td><pre><code>TEMPORARY_TOKEN
</code></pre></td><td>Obtained from calling <code>/initialize-token</code></td></tr><tr><td><pre><code>taikiUserId
</code></pre></td><td><pre><code>TAIKI_CLIENT_ID
</code></pre></td><td>Obtained from calling <code>/initialize-token</code> If you already called Taiki with this id, Taiki will use the user's saved credentials from last year</td></tr><tr><td><pre><code>metadata
</code></pre></td><td><pre><code>{YOUR_METADATA}
</code></pre></td><td>Your metadata that you want to receive when Taiki calls your webhook.</td></tr><tr><td><pre><code>onSuccess
</code></pre></td><td><pre><code>{YOUR_FUNCTION}
</code></pre></td><td>Any function</td></tr></tbody></table>

For now, the Taiki modal is a CDN-Hosted Script. We will add support for more popular libraries in the future.&#x20;
