> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/guides-and-quickstarts/using-tools-and-actions/end-user-connections.md).

# End user connections

An end-user connection lets each person authorize the account an agent uses for them. Use this mode when results must come from the user's connected service account.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FWUiK3BYRwpSx17hsqLSI%2FG053.mp4?alt=media&token=f7599236-75b3-4289-a8a9-4ccaa48aec9f>" %}

## Before you start

Open an editable agent with a provider tool that offers **Use end-user connection**. Prepare a published interface and users with different source access and their own provider accounts. See [Give an agent tools](https://docs.stackai.com/guides-and-quickstarts/agent-builder-and-skills/give-an-agent-tools.md) if the tool is not yet attached.

## Configure the tool

Open the account-backed tool in the agent's configuration.

![Agent tool connection settings](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/EVwMLq3k70sYIs5qHK4k/assets/g053-g053-01-tool.png)

Define how the agent should use the returned information and whether it may change external records.

Set Connection to Use end-user connection.

![Agent tool connection settings](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/NF0gzMeVhdp5Zm2ASgA6/assets/g053-g053-02-mode.png)

The user of the published interface will then authorize the account used by that tool.

## Review builder behavior

Review any builder connection fallback shown in the editor.

![Builder connection fallback behavior](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/gxaETlMYOCoSkfepa7kg/assets/g053-g053-03-fallback.png)

A builder run can use different authorization from the published end-user experience.

## Prepare the published interface

Configure the user-facing interface and its access settings for the intended audience.

![End-user interface access configuration](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/EMB9NtgqMlCu1rDXvGPD/assets/g053-g053-04-interface.png)

The end-user authorization prompt appears in that interface when a tool needs a connection.

## Connect an end-user account

Open the interface as a user and submit a request that needs the tool.

![End-user account authorization flow](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/u0qB4NxEM9xKvPu00hHe/assets/g053-g053-05-authorize.png)

Complete the provider authorization for that user's intended account.

Continue the request after authorization and inspect the returned result.

![End-user account authorization flow](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/BEySU3YOl1R3KgmRDr4i/assets/g053-g053-06-first-result.png)

Confirm that the information comes from the connected user's account.

## Review account-specific access

Repeat the flow in a separate user session when checking account-specific behavior.

![Account-specific connection access checks](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/sb7zpZaNOvvWs2kApyP2/assets/g053-g053-07-second.png)

Authorize that user's own provider account rather than reusing another session's credentials.

Compare the results with the data accessible to each account.

![Account-specific connection access checks](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/meXwqn61FaSxuNcdaxmn/assets/g053-g053-08-second-result.png)

Different users should receive results appropriate to their own authorized connections.

Review connection ownership in the connector's inventory.

![Account-specific connection access checks](https://content.gitbook.com/content/SQ1Sgy933krTyK0S4JpP/blobs/53Q2vFLn30P0pucU4Ker/assets/g053-g053-09-inventory.png)

Use the owner information to understand which user supplied each authorization.

## Important behavior

A builder connection can differ from the account used in the published interface. Review access through the interface when the tool is configured for end-user connections.

Each end user authorizes their own provider account. Returned information depends on that account’s permissions.

## Continue

* [Interface authentication and access](https://docs.stackai.com/guides-and-quickstarts/interfaces-and-end-user-experiences/interface-authentication-and-access.md)
* [Publish a Chat Assistant](https://docs.stackai.com/guides-and-quickstarts/interfaces-and-end-user-experiences/publish-a-chat-assistant.md)


---

# 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.stackai.com/guides-and-quickstarts/using-tools-and-actions/end-user-connections.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.
