> For the complete documentation index, see [llms.txt](https://integuru.gitbook.io/taiki-documentaion/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integuru.gitbook.io/taiki-documentaion/detailed-references/taiki-client-sdk.md).

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


---

# 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://integuru.gitbook.io/taiki-documentaion/detailed-references/taiki-client-sdk.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.
