> For the complete documentation index, see [llms.txt](https://integuru.gitbook.io/docs/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/docs/quickstart.md).

# QuickStart

## Step 1: Account set up

Email Alan (<alan@taiki.online>) from the Taiki team for account setup. Provide your desired webhook URL to receive the documents retrieved from Taiki's provided platforms. We will provide you with the `api_key` and `api_secret` for the next steps.

## Step 2: Initialize JWT Token

*(For in-depth details:* [Initialize JWT Token](/docs/detailed-references/initialize-jwt-token.md)*)*

Generate a temporary Access Token (JWT) on your server which is used for secure connections between the Taiki App and Taiki's servers. The access token expires in 1 hour.&#x20;

Send the JWT to your frontend for [#step-3-open-taiki-link](#step-3-open-taiki-link "mention").

**Important:**&#x20;

* **This must be generated on your servers and sent to your front end to the Taiki App.**
* **A JWT token must be generated every time you open the Taiki App.**

```javascript
const tokenResponse = await fetch("/api/token", {
    method: 'POST', 
    headers: {
        'Content-Type': 'application/json'
    },
    body: JSON.stringify({
        'api_key': 'YOUR_API_KEY',
        'api_secret': 'YOUR_API_SECRET', // can be regenerated via the dashboard.
        'taiki_user_id': '(OPTIONAL) TAIKI_USER_ID'
    }),
});

const data = await tokenResponse.json(); // Added 'await' to ensure the promise resolves properly

// For client to open the Taiki App
const ACCESS_TOKEN = data.access_token;
// To associate the user's login credentials with a unique ID
const TAIKI_USER_ID = data.taiki_user_id;
```

## Step 3: Invoke the Taiki App

*(For in-depth details:* [Invoke the Taiki App](/docs/detailed-references/invoke-the-taiki-app.md))

Send the JWT token from your backend to your frontend then [Invoke the Taiki App](/docs/detailed-references/invoke-the-taiki-app.md).

There are two ways to trigger the Taiki App.

1. [Invoke the Taiki App](/docs/detailed-references/invoke-the-taiki-app.md#invoking-the-taiki-app-from-webapp). Taiki will provide a js CDN library that generates a QR code that users can scan to open an app clip/instant app.
2. [Invoke the Taiki App](/docs/detailed-references/invoke-the-taiki-app.md#invoking-the-taiki-app-from-ios) and [Invoke the Taiki App](/docs/detailed-references/invoke-the-taiki-app.md#invoking-the-taiki-app-from-android). You can trigger the app via the app clip/instant app link.

## **Step 4: Receive Data**

Upon successful data retrieval, Taiki servers will hit your provided webhook URL above. The payload looks like below. Taiki will retrieve all bank statements and tax-related documents such as various 1099s from the user's accounts. These documents will be accessible via a download URL.

**Note**: the download link expires within 15 minutes for security reasons.&#x20;

<pre class="language-json"><code class="lang-json">POST /{YOUR_WEBHOOK_URL}
Content-Type: application/json

<strong>{
</strong>  "status": "success", 
  "data": {
    "id": 123, 
    "client_id": "a6f2f489-8cc9-4385-9649-efeabdfbe41b",
    "metadata": {YOUR_METADATA},
    "created_at": "2023-03-12T21:30:00Z" 
  },
  "files": [{ 
      "status": "success",
      "file_name": "1099_INT.pdf",
      "download_url": "example.com",
      "total_size_bytes": 9.34
  }]
}
</code></pre>


---

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

```
GET https://integuru.gitbook.io/docs/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
