> For the complete documentation index, see [llms.txt](https://docs.appmixer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appmixer.com/6.0/v4.1/appmixer-sdk/api-reference/accounts.md).

# Accounts

## appmixer.ui.Accounts

![](https://198492512-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LATDgYqVMe0hChW7efU%2F-L_Iqy4wpN4OpykkYsJU%2F-L_IxuGwVreephwFv_C4%2FScreenshot%202019-03-06%20at%2018.05.21.png?alt=media\&token=21e6eb86-7fb2-44c2-b72e-863b3be65573)

The appmixer.ui.Accounts is a UI widget that displays the user's connected accounts.

| Method                         | Description                                                                                                                                                                                                                                          |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `appmixer.ui.Accounts(config)` | Constructor function that accepts `config` object. The `config` object must contain at least the `el` property that points to a container DOM element where the Accounts will be rendered.                                                           |
| `open()`                       | Render the Accounts inside its container.                                                                                                                                                                                                            |
| `close()`                      | Close the Accounts.                                                                                                                                                                                                                                  |
| `on(event, handler)`           | React on events of the accounts widget. See below for the list of events the accounts widget supports.                                                                                                                                               |
| `off([event, handler])`        | Remove event listeners. If no arguments are provided, remove all event listeners. If only the `event` is provided, remove all listeners for that event. If both `event` and `handler` are given, remove the listener for that specific handler only. |
| `reload()`                     | Refresh the Accounts.                                                                                                                                                                                                                                |

### Accounts Events

| Event       | Callback           | Triggered when...                                              |
| ----------- | ------------------ | -------------------------------------------------------------- |
| `flow:open` | `function(flowId)` | the user clicks to open a flow the account is associated with. |

### Example

```javascript
var accounts = appmixer.ui.Accounts({
    el: '#your-accounts-div'
});
accounts.on('flow:open', function(flowId) {
    designer.set('flowId', flowId);
    designer.open();
});
accounts.open();
```

##


---

# 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.appmixer.com/6.0/v4.1/appmixer-sdk/api-reference/accounts.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.
