> For the complete documentation index, see [llms.txt](https://docs.toolkit.equs.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.toolkit.equs.ai/docs/presentation/flows-1-and-2.md).

# Flows 1 and 2 (through Frontend)

Two routes to the same result, sharing one set of instructions

**Flow 1 - DC API: Wallet → Frontend** and **Flow 2 - Direct Post: Wallet → Platform → Frontend** differ in one respect only: how the `vp_token` travels from the wallet to your front end. Everything around that - the Verifier and VP Schema you configure once, the calls you make, the record you read afterwards - is identical. So they share one set of instructions.

<table data-search="false"><thead><tr><th></th><th>Flow 1 - DC API: Wallet → Frontend</th><th>Flow 2 - Direct Post: Wallet → Platform → Frontend</th></tr></thead><tbody><tr><td><strong>Route</strong></td><td>Wallet → your front end. The platform never relays it</td><td>Wallet → platform → your front end collects it</td></tr><tr><td><strong>Protocol</strong></td><td>OID4VP <code>dc_api.jwt</code></td><td>OID4VP <code>direct_post.jwt</code></td></tr><tr><td><strong>Holder does</strong></td><td>Approves in a native prompt</td><td>Scans a QR code, and cross-device also types a short code</td></tr><tr><td><strong>Personal data in platform storage</strong></td><td>None</td><td>The <code>vp_token</code>, encrypted, until you verify it or 5 minutes pass</td></tr><tr><td><strong>Works everywhere</strong></td><td>No - needs browser and OS support for the DC API</td><td>Yes</td></tr></tbody></table>

In both cases you then send the token to the platform to be verified - the same call either way. The routes above describe only how it reaches you.

See [Choose a Flow](/docs/presentation/choose-a-flow.md) for the full comparison, and for how these two sit against [Flow 3 (direct to Backend)](/docs/presentation/flow-3.md).

{% hint style="success" %}
**You usually don't choose between them.** Embed UI implements both and picks at runtime, according to the Holder's device and the wallet they select. Enable the DC API (off by default) and Flow 2 becomes the automatic fallback wherever it isn't available.
{% endhint %}

### What you'll do

{% stepper %}
{% step %}

#### Configure

Create a Verifier and a VP Schema - see [Configuration](/docs/presentation/configuration.md). This step is identical for every flow.
{% endstep %}

{% step %}

#### Pick an integration method

[Method 1: Embed UI + API](/docs/presentation/flows-1-and-2/embed-ui-and-api.md) is the recommended path and covers both flows. [Method 2: Build Your Own UI](/docs/presentation/flows-1-and-2/build-your-own-ui.md) is for teams that need to own the Holder-facing experience.
{% endstep %}

{% step %}

#### Read the result

Every request leaves a record - see [Verification Result](/docs/presentation/verification-result.md).
{% endstep %}
{% endstepper %}

### When the difference does matter

* **Nothing personal may reach platform storage, even briefly.** Flow 2 writes the encrypted `vp_token` for as long as it takes you to verify it. Flow 1 never does. If that write is unacceptable, either restrict yourself to Flow 1 and accept the coverage gap, or use [Flow 3 (direct to Backend)](/docs/presentation/flow-3.md).
* **You are building your own UI.** Method 2 makes the two flows visibly different: Flow 1 is a browser API call, Flow 2 is a QR code plus a cross-device code bridge you may have to build.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.toolkit.equs.ai/docs/presentation/flows-1-and-2.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
